Deepin或Ubuntu 运行环境搭建

安装 Nginx:
sudo apt-get install nginx


安装 tengine:
tengine-2.2.0.tar.gz上传并tar xzvf 解压
apt-get install openssl
apt-get install libssl-dev


root账号登录
./configure
make
sudo make install


/usr/local/nginx/sbin/nginx -s start
/usr/local/nginx/sbin/nginx -s stop
/usr/local/nginx/sbin/nginx -s reload




安装 Apache2:
sudo apt-get install apache2


修改 Apache2默认端口(如果不安装Nginx可以忽略):
cd /etc/apache2 ports.conf 80改8000 443改444
cd /etc/apache2/sites-enabled 修改 000-default.conf 端口改位8000


重启服务
sudo service apache2 restart
sudo service nginx restart


安装PHP模块:
sudo apt-get install php5


安装Mysql
sudo apt-get install mysql-server


其他模块安装:
sudo apt-get install libapache2-mod-php5 


sudo apt-get install libapache2-mod-auth-mysql  ----error


sudo apt-get install php5-mysql


sudo apt-get install php5-gd


修改mysql root密码
mysql -uroot
SET NAMES utf8;
use mysql; 
UPDATE user SET Password = PASSWORD('123456') WHERE user = 'root';
FLUSH PRIVILEGES;


配置phpmyadmin
sudo apt-get install phpmyadmin
sudo ln -s /usr/share/phpmyadmin/ /var/www/html/

你可能感兴趣的:(Linux)