there are several procedure which include:

1. Install the packages

sudo apt-get install php5 php5-gd php5-cgi php5-mysql libapache2-mod-php5 apache2 mysql-client mysql-server -y

2. Configure the mysql database password if necessary

3.edit file

/etc/apache2/sites-available

touch /etc/apache2/sites-available/mysite

---

put something like this in the file 'myfile':

<VirtualHost *:80>
ServerAdmin webmaster@localhost DocumentRoot /var/www
DirectoryIndex index.html index.php index.htm
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
<Files *.html,*.htm,*.php>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order deny,allow
allow from all
</Files>
</Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory> </VirtualHost>

4.restart the apache2 service using:

service apache2 reload

5.write the first PHP page:

$ cat > /var/www/phpinfo.php << EOF
<?php
phpinfo();
?>
EOF

6. using the browser to check the page out!

Input your site and the pages

http://your_site_ip/phpinfo.php

Then you will see something like this:

7. install phpMyAdmin

wget -c http://dlsw.baidu.com/sw-search-sp/soft/26/14218/phpMyAdmin-4.1.4-all-languages.3715384168.zip -O /tmp/phpMyAdmin-4.1.4-all-languages.zip
 unzip /tmp/phpMyAdmin-4.1.4-all-languages.3715384168.zip -d /var/www
mv phpMyAdmin-4.1.4-all-languages/ sqladmin # for secure reason coz there could be some blackcat miu scanning, you know.

8. open the page there:

http://your_site_ip/sqladmin

you would see:

and login then,

最新文章

  1. 【JBOSS】控制台数据库连接信息
  2. web页面全角&amp;半角
  3. Social Emotional Computing -情感模式与价值变化
  4. java导出excel报错:getOutputStream() has already been called for this response
  5. 【转】【C#】SendMessage
  6. Delphi7下SuperObject的JSON使用方法
  7. tcp连接的3次握手
  8. JVM 进行线程同步背后的原理
  9. linux下多线程踩过的坑(不定更新)
  10. phpstorm 解决svn 无法提交的问题
  11. 第一个关于ajax的代码
  12. SQLServer数据库误删数据找回
  13. IP查询接口1
  14. yii2-验证规则,rules,判断条件
  15. ansible实践-1
  16. 深入浅出低功耗蓝牙(BLE)协议栈
  17. 深入理解JVM(2)——运行时数据区
  18. Chapter6_访问权限控制_访问权限修饰词
  19. PHP超级全局变量、魔术变量和魔术函数
  20. TZOJ 4602 高桥和低桥(二分或树状数组+二分)

热门文章

  1. Equals 和==
  2. 苹果新的编程语言 Swift 语言进阶(十二)--选项链
  3. C# 获取磁盘容量
  4. 多个Storyboard切换
  5. Appium根据xpath获取控件实例随笔
  6. HDOJ 4416 Good Article Good sentence
  7. js 实现复制粘贴文本过滤(保留文字和图片)
  8. 如何有效的遍历django的QuerySet
  9. 手机网站keyup解决方案
  10. ASP.NET MVC Model绑定