【Ubuntu】在Ubuntu上构建LAMP环境

创建用户

创建用户

# adduser nishide
Adding user `nishide' ...
Adding new group `nishide' (1001) ...
Adding new user `nishide' (1001) with group `nishide' ...
Creating home directory `/home/nishide' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for nishide
Enter the new value, or press ENTER for the default
    Full Name []:
    Room Number []:
    Work Phone []:
    Home Phone []:
    Other []:
Is the information correct? [Y/n]

给予创建的用户sudo权限。

# usermod -G sudo nishide   

建立LAMP环境

在后续中还需要确认是否使用apptitude而不是apt-get的情况。

将操作系统软件包更新至最新版本

# apt-get update -y

安装相关的开发包。

# apt-get install openssl

安装Apache。

# apt-get install apache2 -y

安装MySQL

# apt-get install -y mysql-server libapache2-mod-auth-mysql

安裝PHP

# apt-get install -y php5 php5-mysql libapache2-mod-php5 php5-mcrypt php5-json

其他笔记

initctl命令

# initctl restart ssh       # ssh重新启动
发表回复 0

Your email address will not be published. Required fields are marked *


广告
将在 10 秒后关闭
bannerAds