1.软文推荐

2.软文推荐

3.软文推荐

现在很多朋友都喜欢租用RAKsmart VPS,其主要优势是国内访问速度快,性能好,而且租用价格也比较便宜。目前RAKsmart提供美国VPS、香港VPS和日本VPS等国外VPS产品,而且方案种类比较多,支持Linux和Windows两种操作系统,适合不同用户的建站需求。

其中使用RAKsmart Linux VPS一般都需要安装Web环境才能搭建网站,常见的像是LAMP、LNMP等环境。本文就给大家介绍下RAKsmart Linux VPS中安装LAMP环境的操作步骤,仅供大家参考。

实验环境:

Centos7.1版本

252MB内存

[root@appmoney ~]#

一、配置Apache环境

1、安装Apache

[root@appmoney ~]# yum install httpd httpd-devel

2、启动Apache

[root@appmoney ~]# systemctl start httpd

3、设置httpd服务开机启动

[root@appmoney ~]# systemctl enable httpd

4、查看状态

[root@appmoney ~]# systemctl status httpd

5、防火墙设置开启80端口

[root@appmoney ~]# firewall-cmd –permanent –zone=public –add-service=http

success

[root@appmoney ~]# firewall-cmd –permanent –zone=public –add-service=https

success

[root@appmoney ~]# firewall-cmd –reload

success

6、浏览器登陆

访问IP地址(独立IP),出现以下界面说明安装成功:


二、MySQL环境配置

1、安装MySQL

[root@appmoney ~]# yum install mariadb mariadb-server mariadb-libs mariadb-devel

[root@appmoney ~]# rpm -qa |grep maria

2、开启MySQL服务,并设置开机启动和检查状态

[root@appmoney ~]# systemctl start mariadb

[root@appmoney ~]# systemctl enable mariadb

[root@appmoney ~]# systemctl status mariadb

[root@appmoney ~]# netstat -tulp

3、数据库安全设置

[root@appmoney ~]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we’ll need the current
password for the root user. If you’ve just installed MariaDB, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
… Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
… Success!

Normally, root should only be allowed to connect from ‘localhost’. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] n
… skipping.

By default, MariaDB comes with a database named ‘test’ that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
– Dropping test database…
… Success!
– Removing privileges on test database…
… Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
… Success!

Cleaning up…

All done! If you’ve completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

4、登陆MySQL数据库测试

[root@appmoney ~]# mysql -uroot -p

三、PHP环境配置

1、安装PHP

[root@appmoney ~]# yum -y install php

[root@appmoney ~]# rpm -ql php

2、将PHP与MySQL关联起来

[root@appmoney ~]# yum install php-mysql

[root@appmoney ~]# rpm -ql php-mysql

3、安装常用PHP模块

[root@appmoney ~]# yum install -y php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap curl curl-devel php-bcmath

4、测试PHP

[root@appmoney ~]# cd /var/www/html/

[root@appmoney html]# ls

[root@appmoney html]# vi info.php

?php
phpinfo();
?
~
~
:wq

5、重启Apache服务器

[root@appmoney ~]# systemctl restart http

6、在电脑浏览器输入 IP/info.php,观察能否看到已经安装的模块。

以上就是这次RAKsmart Linux VPS安装LAMP环境教程,安装完成后就可以安装WordPress等各种程序了。

相关推荐:《RAKsmart VPS主机控制面板SolusVM使用介绍》

来源:idcspy.com/raksmart-20544.html

本站声明:内容来源于网络,内容不代表本站立场,仅供阅读参考,文章版权归原作者“本公司cmy.cn”所有。如有侵权,请联系我们删除。

免责声明:本站发布的内容(图片、视频和文字)以原创、来自本网站内容采集于网络互联网转载等其它媒体和分享为主,内容观点不代表本网站立场,如侵犯了原作者的版权,请告知一经查实,将立刻删除涉嫌侵权内容,联系我们56dr_com,同时欢迎投稿传递力量。

相关文章 8

1

服务器带宽怎么计算和挑选?(服务器带宽怎么判断够不够) 3分钟前

知道过服务器租赁的工作员都了解,网络服务器除开必须挑选系统配置之外,也要考虑到用多少的网络带宽。那麼,网络带宽到底怎样估计...

2

韩国KTVPS(韩国ktv必点歌曲老歌列表) 5分钟前

目录:1、求几首适合在KTV唱得韩国欢快的歌曲 要老歌 不要流行歌曲 要男人唱得2、在韩国签售会上ps是什么意思啊?是可以给饭写话嘛?...

3

什么是免备案云服务器(免备案云主机) 7分钟前

什么是免备案云服务器?免备案云服务器是指,不用备案,就可以可用于建站等用途的服务器。现在使用较多的免费备案云服务器,属香港...

4

美国虚拟主机Lunarpages助力外贸商务 提升竞争力(美国虚拟主机网站) 10分钟前

近年来,多家企业推出众多贸易便利化的措施,大力开展技术创新和商业模式创新,不断提升外贸企业的国际竞争力。不过,企业要想开拓...

5

windows2008r2激活(windows2008r2激活命令) 10分钟前

目录:1、怎么激活windows2008 r22、如何激活Windows 2008 R2 Win2008 R2有效激活方法3、windows server 2008 r2 datacenter sp2激活怎么激活windows2008 r2 KMS激活指...

6

服务器机箱几个不同的类别有什么区别?(服务器几台) 12分钟前

服务器机箱几个不同的类别有什么区别?服务器早已是现阶段应用最普遍的机器设备之一,一切在网络上开拓市场,运营网站的公司都不可...

7

集团公司网站改版方案书应该怎么制作?(公司改名网站) 13分钟前

??在互联网时代,对于公司企业而言,拥有自己的官方已经是做好公司业务的标配。而随着互联网更新换代速度极快的趋势以及现代社会信息...

8

方便对比购买韩国vps(韩国买什么东西划算) 15分钟前

目录:1、国外的vps租用应该怎么选择?租用香港的好还是韩国的好?2、最近找到一家很好的韩国vps,分享给大家kdatacenter。3、哪款海外 VPS...