ubuntu server资料

2.改变键盘布局

  sudo dpkg-reconfigure keyboard-configuration

      或sudo vim /etc/default/keyboard,修改XKBLAYOUT变量的值为US

3.修改软件源

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup  --备份软件源
sudo nano /etc/apt/sources.list --nano(ctrl+x退出并保存,nano命令),vi修改(:wq保存退出)
sudo apt-get clean --刷新软件源
sudo apt-get updte --更新软件源

阿里云软件源:http://mirrors.aliyun.com/

  deb http://mirrors.aliyun.com/ubuntu/ quantal main restricted universe multiverse
  deb http://mirrors.aliyun.com/ubuntu/ quantal-security main restricted universe multiverse
  deb http://mirrors.aliyun.com/ubuntu/ quantal-updates main restricted universe multiverse
  deb http://mirrors.aliyun.com/ubuntu/ quantal-proposed main restricted universe multiverse
  deb http://mirrors.aliyun.com/ubuntu/ quantal-backports main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ quantal main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ quantal-security main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ quantal-updates main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ quantal-proposed main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ quantal-backports main restricted universe multiverse

三、安装Nginx(http://wiki.ubuntu.org.cn/Nginx)

1 sudo apt-get install nginx    --安装
2 
3 sudo /etc/init.d/nginx start  --启动
安装成功以后,可打开本地回路地址查看网页

四、安装mysql

1 apt-get install mysql-server mysql-client

安装过程需要设置root的密码。Ubuntu下,MySQL的配置信息在/etc/mysql目录

 

五、安装PHP

5.1安装php

1 sudo apt-get install php  --安装
2 
3 dpkg -l | grep php          --查看已安装

5.2安装PHP-FPM

1 sudo apt-get install php-fpm

(1)启用fpm

1 udo service php7.0-fpm
2 sudo service php7.0-fpm status 
3 ps aux | grep php-fpm

(2)查看进程(php-fpm 工作进程的用户和用户组要和 nginx 的工作进程的用户和用户组配成一致)

1 ps -e -o cmd,pid,user,uid,group,gid | grep php-fpm
2 ps -e -o cmd,pid,user,uid,group,gid | grep nginx  

 

六、配置ngnix站点

1 sudo vi /etc/nginx/sites-available/default

6.1修改PHP配置项

6.2添加php测试文件

1 sudo vi /var/www/html/info.php   --新建文件

按下I键,输入显示PHP环境语句

1 <?php phpinf(); ?>

浏览http://回路地址/info.php,显示如下

...

posted on 2017-03-21 13:57  dudumao  阅读(252)  评论(0编辑  收藏  举报

导航

阿里云