首页
友人帐
留言板
关于
Search
1
IDE Eval Resetter:JetBrains 全家桶无限试用插件
243 阅读
2
影视资源采集站收录大全
176 阅读
3
linux安装或升级protoc
153 阅读
4
批量采集美女写真等图片做图片站
115 阅读
5
VFM 3.7.5 源码 - 一个极简的 PHP 私人云盘!
95 阅读
谈天说地
程序源码
技术教程
成品源码
登录
Search
标签搜索
PHP
linux
源码
go
windows
centos
原创
mysql
微信
激活
采集
宝塔
绿色版
API
解析
SDK
图片
破解
域名
html
云青
累计撰写
150
篇文章
累计收到
77
条评论
首页
栏目
谈天说地
程序源码
技术教程
成品源码
页面
友人帐
留言板
关于
搜索到
9
篇与
的结果
2019-07-11
CentOS7中编译安装redis5.0
环境介绍CentOS7 (未安装Development Tools)下载Redis5.0-rc3 wget -O redis-5.0-rc3.tar.gz https://github.com/antirez/redis/archive/5.0-rc3.tar.gz解压redis tar -zxvf redis-5.0-rc3.tar.gz -C /usr/local编译并安装 cd /usr/local/redis-5.0-rc3 make此时会出错: compilation terminated. make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory `/usr/local/redis-5.0-rc3/src' make: *** [all] Error 2安装Development Tools yum groupinstall 'Development Tools'再次执行,还会报错 make cd src && make all make[1]: Entering directory `/usr/local/redis-5.0-rc3/src' CC adlist.o In file included from adlist.c:34:0: zmalloc.h:50:31: fatal error: jemalloc/jemalloc.h: No such file or directory #include <jemalloc/jemalloc.h> ^ compilation terminated. make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory `/usr/local/redis-5.0-rc3/src' make: *** [all] Error 2最后解决方案如下: cd /usr/local/redis-5.0-rc3/deps; make hiredis lua jemalloc linenoise编译完成后再次在/usr/local/redis-5.0-rc3中执行make命令 cd /usr/local/redis-5.0-rc3 make出现如下即编译成功 Hint: It's a good idea to run 'make test' ? make[1]: Leaving directory `/usr/local/redis-5.0-rc3/src'然后在/usr/local/redis-5.0-rc3/src中执行安装命令: cd /usr/local/redis-5.0-rc3/src make install会出现如下日志信息 Hint: It's a good idea to run 'make test' ? INSTALL install INSTALL install INSTALL install INSTALL install INSTALL install修改redis.conf配置文件 vim /usr/local/redis-5.0-rc3/redis.conf只需要调整如下几个即可 protected-mode no # 关闭保护模式 daemonize yes # 守护进程模式开启启动redis5.0 /usr/local/redis-5.0-rc3/src/redis-server /usr/local/redis-5.0-rc3/redis.conf其实我们在执行make install的时候会将src下面的几个命令复制到/usr/local/bin/下面去,也可以执行如下命令启动redis5.0 /usr/local/bin/redis-server /usr/local/redis-5.0-rc3/redis.conf检查端口 netstat -ltnp |grep 6379如果有端口监听,说明redis已经启动成功。连接下试试 redis-cli 127.0.0.1:6379> info # Server redis_version:4.9.103 redis_git_sha1:00000000 redis_git_dirty:0 redis_build_id:207f31cf830c081e redis_mode:standalone os:Linux 3.10.0-693.17.1.el7.x86_64 x86_64 arch_bits:64 multiplexing_api:epoll atomicvar_api:atomic-builtin gcc_version:4.8.5 process_id:20361 run_id:4835668974ad86f1db9b3c8b98e02be1a87a7b9b tcp_port:6379 uptime_in_seconds:689 uptime_in_days:0 hz:10 lru_clock:3944003 为什么能在任意目录执行redis-cli命令呢,因为redis-cli命令在/usr/local/bin目录里面,而该目录又配置在PATH中,所以你可以向执行ls、mkdir等命令的方式去执行redis-cli或者redis-server等命令。一般我们在安装完redis后就会将其安装包给删除,那么我们只需要将redis.conf配置文件移动的其他目录,比如:/etc/redis/redis.conf中,具体位置在哪请按照自己的习惯或者规范放置即可。
2019年07月11日
6 阅读
0 评论
0 点赞
2018-03-26
centos7快速搭建LAMP
1、安装apache 1.1 安装apache [root@host ~]# yum install httpd httpd-devel1.2 启动apache服务 [root@host ~]# systemcti start httpd1.3 设置httpd服务开机启动 [root@host ~]# systemctl enable httpd1.4 防火墙设置开启80端口 [root@host ~]# firewall-cmd --permanent --zone=public --add-service=http success [root@host ~]# firewall-cmd --permanent --zone=public --add-service=https success [root@host ~]# firewall-cmd --reload success2、安装mysql 2.1 安装mysql [root@host ~]# yum install mariadb mariadb-server mariadb-libs mariadb-devel2.2 开启mysql [root@host ~]# systemctl start mariadb 2.3 设置mysql服务开机启动 [root@host ~]# systemctl enable mariadb2.4 数据库安全设置 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!s 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!3、安装PHP 3.1 安装php [root@host ~]# yum -y install php3.2 将php与mysql关联 [root@host ~]# yum install php-mysql3.3 安装常用PHP模块 [root@host ~]# 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-bcmath3.4 重启apache服务器 [root@root ~]# systemctl restart http现在centos7下lamp环境就已经安装完毕
2018年03月26日
3 阅读
0 评论
0 点赞
2018-03-26
centos7中解决无法识别ntfs格式
CentOS默认源里没有ntfs3g,想要添加ntfs支持,无非是自己下载编译安装或者加源yum安装添加aliyun的epel源来yum安装的方式,简单易行1、加源 wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo2、安装 yum update;yum install ntfs-3g yum install ntfs-3g
2018年03月26日
2 阅读
0 评论
0 点赞
2018-03-25
centos7安装phpmyadmin
首先服务器要有web 环境yum install phpmyadmin有时候会安装不成功,提示没有可用软件包,则需要安装Remi源 # yum install epel-release # rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm修改配置 vim /etc/httpd/conf.d/phpMyadmin.conf将 Require ip 127.0.0.1 Require ip ::1 注释添加Require all granted即可在浏览器本地通过localhost/phpmyadmin 访问修改配置 vim /etc/phpMyAdmin/config.inc.php $cfg['Servers'][$i]['host'] = 'localhost'; //设定MySQL所在的主机名或IP地址。如127.0.0.1这步很重要 $cfg['Servers'][$i]['auth_type'] = 'cookie'; // 设定进入phpMyAdmin管理MySQL的方式,共有三个选项:config、http、cookie。config是按配置文件登录,为默认方式, 无需任何确认;http是使用HTTP登录管理,在Apache模块安装下才能支持;cookie是最通用的管理方式。后两种方式的用户名和密码都是直接到数据库中验证。 $cfg['Servers'][$i]['user'] = 'root' ; //设定管理MySQL的账号。 $cfg['Servers'][$i]['password'] = '' ; //设定管理MySQL的密码。 设置完成后,保存config.inc.php文件,重启Apache,测试:访问http://localhost/phpMyAdmin/如果访问报错如下图:不慌这种情况是给phpMyAdmin目录的权限太高,给755权限就不会报错了chmod -R 755 /etc/phpMyadmin
2018年03月25日
5 阅读
0 评论
0 点赞
1
2