Centos7 Lamp 小白配置成功

大家好,
由于工作原因没有及时将摘抄整理的文章po出来,十分抱歉。我会加快整理,希望能够给初学小伙伴们参考,有不足之处还请指正。

扫盲:LAMP=Linux+Apache+MySQL+PHP

Linux的安装相对于简单,就不赘述了,要点如下:
一、Apache的安装:
1、安装Apache:
Centos7的库中有Apache,所以安装Apache相对简单,需要安装程序包,请运行命令如下:(CentOS和RHEL通用)

$ sudo yum install httpd

安装完成后,启用并启动Apache服务:

$ sudo systemctl enable httpd
$ sudo systemctl start httpd

2、调整防火墙
需要打开HTTP和HTTPS端口,80以及443。使用以下命令打开必要的端口:

$ sudo firewall-cmd --permanent --zone=public --add-service=http
$ sudo firewall-cmd --permanent --zone=public --add-service=https
$ sudo firewall-cmd --reload

3、验证Apache安装
现在我们在CentOS 7服务器上安装并运行了Apache,我们可以检查Apache服务的状态和版本,包括:

$ sudo systemctl status httpd

输出如下:

● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2018-04-26 07:13:07 UTC; 11s ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 3049 (httpd)
Status: “Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec”
CGroup: /system.slice/httpd.service
├─3049 /usr/sbin/httpd -DFOREGROUND
├─3050 /usr/sbin/httpd -DFOREGROUND
├─3051 /usr/sbin/httpd -DFOREGROUND
├─3052 /usr/sbin/httpd -DFOREGROUND
├─3053 /usr/sbin/httpd -DFOREGROUND
└─3054 /usr/sbin/httpd -DFOREGROUND

查看版本信息:

$ sudo httpd -v

输出如下:

Server version: Apache/2.4.6 (CentOS)
Server built: Oct 19 2017 20:39:16

最后要验证一切是否正常,请在浏览器中打开服务器IP地址,您将看到默认的CentOS 7 Apache欢迎页面,如下所示:
一切正常
关于一些Apache的简单命令及常识做了一些整理:https://blog.csdn.net/weixin_43336009/article/details/90319542

二、MySQL的安装及简单配置:
Mysql的安装并不难,但是我安装的时候遇到了小插曲:
使用以下命令启用MySQL 5.7存储库:

$ sudo yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm

安装MySQL 5.7软件包:

$ sudo yum install mysql-community-server

安装完毕后,启动MySQL服务并启用它以在系统启动时自动开启服务:

$ sudo systemctl enable mysqld
$ sudo systemctl start mysqld

我们可以通过输入以下内容来检查MySQL服务状态

sudo systemctl status mysqld

命令运行后输出如下:

● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2018-05-23 11:02:43 UTC; 14min ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 4293 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 4310 (mysqld)
Status: “SERVER_OPERATING”
CGroup: /system.slice/mysqld.service
└─4310 /usr/sbin/mysqld

提高MySQL的安全性,保护MySQL:
当MySQL服务器第一次启动时,会为MySQL root用户生成临时密码。您可以通过运行以下命令找到密码:

$ sudo grep ‘temporary password’ /var/log/mysqld.log

命令运行后输出如下:

2018-05-23T10:59:51.251159Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: q&0)V!?fjksL

临时密码为q&0)V!?fjksL,记下来因为下一个命令会要求您输入临时root密码。
运行该mysql_secure_installation命令以提高MySQL安装的安全性:

$ sudo mysql_secure_installation

命令运行后输出如下:

Securing the MySQL server deployment.
Enter password for user root:

输入临时密码后,系统会要求您为root用户设置新密码。密码长度必须至少为8个字符,并且至少包含一个大写字母,一个小写字母,一个数字和一个特殊字符。
重置新密码提示:

The existing password for the user account root has expired. Please
set a new password.

New password:

Re-enter new password:

该脚本还将要求您删除匿名用户,限制root用户对本地计算机的访问权限并删除测试数据库。你应该对所有问题回答“是”(是)。除了disallow

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we’ll need the current password for the root user. If you’ve just installed MySQL, 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 MySQL root user without the proper authorisation.
Set root password? [Y/n] <–是否设置root用户密码,输入y并回车或直接回车
New password: <– 设置root用户的密码 Re-enter new
password: <– 再输入一次你设置的密码
Password updated successfully! Reloading privilege tables… … Success!

By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having tohave 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] <– 是否删除匿名用户,生产环境建议删除,所以直接回车 … 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] <–是否禁止root远程登录,根据自己的需求选择Y/n并回车,建议禁止 … Success!

By default, MySQL 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] <– 是否删除test数据库,直接回车

  • 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] <–是否重新加载权限表,直接回车 …

Success! Cleaning up…
All done! If you’ve completed all of the above steps, your MySQL installation should now be secure.
Thanks for using MySQL!

以上MySQL配置安装完毕
以root用户的身份登录MySQL服务器:

$ mysql -u root -p

系统将提示您输入mysql_secure_installation脚本运行时先前设置的root密码。
输入密码后,您将看到mysql shell,如下所示:

Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL
connection id is 11 Server version: 8.0.11 MySQL Community Server - GPL

Copyright © 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

之前说过遇到小插曲,就是初始密码无效,经过一番网上查找,找到了一篇文章,亲测有效,上链接:https://blog.csdn.net/baiyan_er/article/details/79966217

三、PHP的安装与简单配置(最后一部了):
说明一下:CentOS 7附带PHP 5.4,我要用PHP7.2以上,所以我们将从Remi存储库安装PHP 7.2。以下命令将启用EPEL和Remi存储库:

$ sudo yum install epel-release yum-utils
$ sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
$ sudo yum-config-manager --enable remi-php72

启用存储库后,使用以下命令安装Apache PHP 7.2和所有必需的PHP扩展:

sudo yum install httpd php php-gd php-json php-mysql php-curl php-mbstring php-intl php-mcrypt php-imagick php-xml php-zip

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
据说是CRM市场最牛软件,从Siebel经过SugarCRM到现在的SuiteCRM Siebel 公司建于1993年,在2001年度财富杂志所发表的全球100个发展最快的企业名单上位居第二位,曾经红得发紫。 2012年 IBM用SugarCRM替代Siebel做为客户关系管理系统,在这一年里Siebel失去惠普、微软和IBM三大顶级客户。 SugarCRM 从2007 年起连续多年获得Bossie Awards年度最佳开源CRM软件,经历了高速成长,从开源慢慢变为只开一点点,直到不再维护开源版。 SuiteCRM 从2014开始, 2015 2016逐年替代了SugarCRM成为Bossie Awards最佳开源CRM软件。 SUITECRM是一个屡获殊荣的企业级的,强大的,可定制的,免费的开源客户关系管理应用程序。14种语言界面自由替换,世界上一些最大的公司是优先选择SUITECRM上一代像SALESFORCE的,SAP,SIEBEL和MICROSOFT应用程序。 SUITECRM提供具有大大降低了部署成本和(TCO)总拥有成本相同的功能,它是完全免费的 - 每行代码是开源的,永远都是。 我们正在改变CRM变得更好 - 更低的成本,更灵活,更快速的部署,没有厂商限制。 经过超过多年的发展,SuiteCRM仍然在不断实现创新及扩展。这位从SugarCRM手中接过开源CRM皇冠的继任者将账目管理、销售自动化与营销工具等从Sugar专业版中的功能加以整合。另外,它还提供丰富的扩展集合,从企业安全插件到搜索、社交媒体乃至Mail Chimp市场营销工具皆在其中。 它的最新版本提供深层报告选项,并经由Suite Spot这一新型分析工具实现。这款拖拽操作型报告设计工具允许大家创建并定义复杂的报告,而不要求使用者接受SQL培训或者具备相关知识。它的报告可以本地方式交付,或者推送至门户网站以进行共享。 而更为重要的是,SuiteCRM用户界面在设计中充分考虑到移动设备的实际情况,专门进行了小屏幕优化,同时提供可靠的信息同步机制。如果大家希望寻找一种功能及性能出众的销售流程与客户交互CRM解决方案,那么SuiteCRM绝对值得一试。 产品亮点 ● 开源、免费,多语言 ● 荣获BOSSIE评比的2014, 2015和2016年度最佳CRM软件 ● 定位于与Salesforce, Oracle, SAP and Microsoft Dynamics等商业CRM竞争 ● 能够通过工作流功能来对报价、Pipeline、合同等进行审批流程设置 ● 产品基于SugarCRM开源版,但远远超出 适用的操作系统 Windows: SuiteCRM runs on any OS that runs PHP Linux: SuiteCRM runs on any OS that runs PHP Mac: SuiteCRM runs on any OS that runs PHP
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值