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