随笔分类 -  centos

1
摘要:安装crontab: yum install crontabs 查看crontab服务状态:service crond status 手动启动crontab服务:service crond start 查看crontab服务是否已设置为开机启动,执行命令:chkconfig --list 如果没有加 阅读全文
posted @ 2017-06-21 15:26 屌丝IT男 阅读(398) 评论(0) 推荐(0) 编辑
摘要:查看当前系统时间 [root@centos64 ~]# date 查看硬件时间 [root@centos64 ~]# hwclock --show 同步时间可以用:ntpdate us.pool.ntp.org,需要联网。如果没有安装ntpdate的可以yum一下:yum install -y nt 阅读全文
posted @ 2017-06-20 17:56 屌丝IT男 阅读(2633) 评论(0) 推荐(0) 编辑
摘要:SecureCRT可以使用linux下的zmodem协议来快速的传送文件,使用非常方便.具体步骤:一.在使用SecureCRT上传下载之前需要给服务器安装lrzsz:A:CentOS中使用yum安装即可 yum -y install lrzsz B:编译安装1、从下面的地址下载 lrzsz-0.12 阅读全文
posted @ 2017-06-17 16:43 屌丝IT男 阅读(2953) 评论(0) 推荐(0) 编辑
摘要:cd /usr/local/src wget http://pecl.php.net/get/zip-1.13.5.tgz tar -zxvf zip-1.13.5.tgz cd zip-1.13.5 /opt/remi/php70/root/usr/bin/phpize #根据自己安装的路径变更 阅读全文
posted @ 2017-06-17 11:39 屌丝IT男 阅读(3790) 评论(0) 推荐(0) 编辑
摘要:方法一:直接运行命令export PATH=$PATH:~/.composer/vendor/bin 使用这种方法,只会对当前会话有效,也就是说每当登出或注销系统以后,PATH 设置就会失效,只是临时生效。 方法二:执行vi ~/.bash_profile修改文件中PATH一行,将~/.compos 阅读全文
posted @ 2017-06-16 12:41 屌丝IT男 阅读(1363) 评论(0) 推荐(0) 编辑
摘要:1.下载composer ps:如果出现php无法运行的情况,请先把PHP加入环境变量 2.移动或复制composer到环境下可执行 3.测试看是否安装成功 ps:如果出现Do not run Composer as root/super user! 请切换用户运行 阅读全文
posted @ 2017-06-12 12:36 屌丝IT男 阅读(477) 评论(0) 推荐(0) 编辑
摘要:造成这个的原因是因为找不到php的执行文件导致的,原先我是安装的php5.4,然后卸载了重新安装php7,导致php可执行文件没有放到$PATH中,可以在终端测试:php -v,如果报错bash: /usr/bin/php: 没有那个文件或目录,就说明php没有放到环境变量中 解决方法: [root 阅读全文
posted @ 2017-06-12 11:21 屌丝IT男 阅读(12677) 评论(0) 推荐(0) 编辑
摘要:首先,在linux系统的/etc/init.d/目录下创建nginx文件,使用如下命令: 这个是nginx官方写的脚本,红色部分需要修改成自己安装ngnix的路径 nginx=”/usr/sbin/nginx” 修改成nginx执行程序的路径。 NGINX_CONF_FILE=”/etc/nginx 阅读全文
posted @ 2017-06-09 12:46 屌丝IT男 阅读(3566) 评论(0) 推荐(0) 编辑
摘要:先查看下所有服务的状态,看看php-fpm有没有正在运行 [root@centos64 html]# service --status-all php-fpm (pid 3568) 正在运行... 如果php-fpm已停,就开启此服务:service php-fpm start 如果php-fpm已 阅读全文
posted @ 2017-06-09 11:39 屌丝IT男 阅读(529) 评论(0) 推荐(0) 编辑
摘要:第一步:在centos下面下载 nginx wget http://nginx.org/download/nginx-1.2.9.tar.gz 解压 tar zxf nginx-1.2.9.tar.gz第二部:新建一个用户nginx在安装操作 useradd nginx passwd nginx第三 阅读全文
posted @ 2017-06-07 11:43 屌丝IT男 阅读(3996) 评论(0) 推荐(1) 编辑
摘要:更新软件源[1] wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm rpm - 阅读全文
posted @ 2017-06-05 11:20 屌丝IT男 阅读(2557) 评论(0) 推荐(0) 编辑
摘要:通过以下命令查看了MySQL的字符集 连接上mysql服务,输入以下命令 mysql>show variables like 'character_set%'; 显示如下: 为了让MySQL支持中文,需要把字符集改变成UTF8, 方法如下: 1. 打开vi /etc/my.cnf 2. 修改成如下内 阅读全文
posted @ 2017-06-03 11:43 屌丝IT男 阅读(570) 评论(0) 推荐(0) 编辑
摘要:原因是MySQL的密码有问题 用mysql匿名用户可以进入数据库,但是看不见mysql数据库. 解决办法:具体操作步骤:关闭mysql:# service mysqld stop然后:# mysqld_safe --skip-grant-tables开启另一个终端并启动mysql:# service 阅读全文
posted @ 2017-06-03 10:53 屌丝IT男 阅读(8818) 评论(1) 推荐(0) 编辑
摘要:先用chkconfig --list查询apache和mysql服务是否存在,不存在则需要手动添加 [root@centos64 vsftpd]# chkconfig --list 测试存在,只需要开启就行了 [root@centos64 vsftpd]# chkconfig httpd on [r 阅读全文
posted @ 2017-06-01 17:26 屌丝IT男 阅读(3519) 评论(0) 推荐(1) 编辑
摘要:首先判断你服务器上是否安装了vsftpd [root@centos64 vsftpd]# rpm -q vsftpd 安装vsftpd [root@centos64 vsftpd]# yum -y install vsftpd 到vsftpd的主配置文件里面修改 [root@centos64 vsf 阅读全文
posted @ 2017-06-01 16:10 屌丝IT男 阅读(169) 评论(0) 推荐(0) 编辑
摘要:配置yum源 追加CentOS 6.5的epel及remi源。 安装PHP5.6 yum源配置好了,下一步就安装PHP5.6。 用PHP命令查看版本。 完毕![root@centos64 ~]# php -vPHP 5.6.30 (cli) (built: Jan 19 2017 08:09:42) 阅读全文
posted @ 2017-05-31 14:46 屌丝IT男 阅读(211) 评论(0) 推荐(0) 编辑
摘要:[root@centos64 ~]# yum -y install mysql-server mysql mysql-devel 查看刚安装mysql数据库版本信息。 输入:rpm -qi mysql-server 阅读全文
posted @ 2017-05-31 14:42 屌丝IT男 阅读(106) 评论(0) 推荐(0) 编辑
摘要:首先网络模式设为桥接 [root@centos64 ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0HWADDR=00:0C:29:80:9D:41TYPE=EthernetUUID=29784981-a8cc-4405-892 阅读全文
posted @ 2017-05-31 12:02 屌丝IT男 阅读(522) 评论(0) 推荐(0) 编辑
摘要:查看Apache是否被安装: [root@centos64 ~]# find / -name 'httpd'/usr/sbin/httpd/usr/lib64/httpd/var/run/httpd/var/log/httpd/var/lock/subsys/httpd/etc/logrotate. 阅读全文
posted @ 2017-05-31 11:48 屌丝IT男 阅读(1475) 评论(0) 推荐(0) 编辑
摘要:增加一条规则 #/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT 将更改进行保存 /etc/rc.d/init.d/iptables save 查看有没有开放80端口 #/etc/init.d/iptables status 这样80端口就开放了 阅读全文
posted @ 2017-05-31 11:19 屌丝IT男 阅读(1723) 评论(0) 推荐(0) 编辑

1
点击右上角即可分享
微信分享提示