LNMP架构的搭建
LNMP 架构的搭建
基础架构图
环境:
server5: nginx mysql php
//需要的安装包 (蓝色为解压后的文件)
[root@test5 ~]# /etc/init.d/iptables stop //关掉防火墙
MYSQL 源码安装
[root@test6 ~]#yum install -y gcc gcc-c++ make ncurses-devel bison
openssl-devel zlib-devel cmake //解决依赖性
[root@test6 ~]# ls
cmake-2.8.12.2-4.el6.x86_64.rpm mysql-boost-5.7.11.tar.gz
[root@test6 ~]# tar zxf mysql-boost-5.7.11.tar.gz
[root@test6 ~]# ls
cmake-2.8.12.2-4.el6.x86_64.rpm mysql-5.7.11 mysql-boost-5.7.11.tar.gz
[root@test6 ~]# yum install -y cmake-2.8.12.2-4.el6.x86_64.rpm
[root@test6 ~]# cd mysql-5.7.11/
[root@test6mysql-5.7.11]#cmake -DCMAKE_INSTALL_PREFIX=/usr/local/lnmp/mysql -DMYSQL_DATADIR=/usr/local/lnmp/mysql/data -DMYSQL_UNIX_ADDR=/usr/local/lnmp/mysql/data/mysql.sock-DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DDEFAULT_CHARSET=utf8
-DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DWITH_BOOST=boost/boost_1_59_0/
注意:
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \ #安装目录
-DMYSQL_DATADIR=/usr/local/mysql/data \ #数据库存放目录
-DMYSQL_UNIX_ADDR=/usr/local/mysql/data/mysql.sock \ #Unix socket 文件路径
-DWITH_MYISAM_STORAGE_ENGINE=1 \ #安装 myisam 存储引擎
-DWITH_INNOBASE_STORAGE_ENGINE=1 \ #安装 innodb 存储引擎
-DWITH_ARCHIVE_STORAGE_ENGINE=1 \ #安装 archive 存储引擎
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 \ #安装 blackhole 存储引擎
-DWITH_PARTITION_STORAGE_ENGINE=1 \ #安装数据库分区
-DENABLED_LOCAL_INFILE=1 \ #允许从本地导入数据
-DWITH_READLINE=1 \ #快捷键功能
-DWITH_SSL=yes \ #支持 SSL
-DDEFAULT_CHARSET=utf8 \ #使用 utf8 字符
-DDEFAULT_COLLATION=utf8_general_ci \ #校验字符
-DEXTRA_CHARSETS=all \ #安装所有扩展字符集
-DMYSQL_TCP_PORT=3306 \ #MySQL 监听端口
编译时可能会出现很多依赖性:
See also "/root/mysql-5.7.11/CMakeFiles/CMakeOutput.log".
[root@test6 ~]# yum install -y gcc gcc-c++
[root@test6 ~]# rm -rf CMakeCache.txt
[root@test6 ~]# yum install -y ncurses-devel
[root@test6 ~]# yum install -y bison
//每修改一次错误,就执行清缓存操作 rm -fr CMakeCache.txt 并再次编译
//编译三部曲 cmake / ./configure...../make/make install
[root@test6 ~]# make && make install
[root@test6 mysql-5.7.11]# cd /usr/local/lnmp/
[root@test6 lnmp]# ls
mysql
[root@test6 lnmp]#cd mysql
[root@test5 mysql]# cd support-files/
[root@test5 support-files]# pwd
/usr/local/lnmp/mysql/support-files
[root@test5 support-files]# cp my-default.cnf /etc/my.cnfcp: overwrite `/etc/my.cnf'? Y
[root@test5 support-files]# vim /etc/my.cnf
[root@test5 support-files]# file mysql.server
mysql.server: POSIX shell script text executable
[root@test5 support-files]# cp mysql.server /etc/init.d/mysqld
cp: overwrite `/etc/init.d/mysqld'? yes
[root@test5 support-files]# cd ..
[root@test5 mysql]# groupadd -g 27 mysql //创建组
[root@test5 mysql]# useradd -u 27 -g 27 -M -d /usr/local/lnmp/mysql/data -s /sbin/nologin mysql //创建用户
[root@test5 mysql]# cd
[root@test5 ~]# vim .bash_profile //将路径注明添加到环境变量
[root@test5 ~]# source .bash_profile //刷新环境变量
[root@test5 ~]# cd -
/usr/local/lnmp/mysql
[root@test5 mysql]# ls
bin
data include lib mysql-test share
COPYING docs keyring man README
support-files
[root@test5 mysql]# vim /etc/my.cnf
[root@test5 mysql]# mysqld --initialize --user=mysql //进行初始化
2018-10-10T05:37:45.328095Z 0 [ERROR] --initialize specified but the data
directory has files in it. Aborting.
2018-10-10T05:37:45.328132Z 0 [ERROR] Aborting
//出现这种问题,应将目录切换到 mysql 下的 data 目录,删除 data 下的所有东西并重新初始化。若没出现这种情况则步骤忽略。
[root@test5 mysql]# cd data/
[root@test5 data]# ls
auto.cnf ibdata1 ib_logfile1 marry mysql.sock performance_schema test5.err
ib_buffer_pool ib_logfile0 ibtmp1 mysql mysql.sock.lock sys test5.pid
[root@test5 data]# rm -rf *
[root@test5 mysql]# cd ..
[root@test5 mysql]# mysqld --initialize --user=mysql //再次初始化
2018-10-10T05:41:49.135259Z 0 [Warning] Gtid table is not ready to be used.
Table 'mysql.gtid_executed' cannot be opened.
2018-10-10T05:41:49.135787Z 1 [Note] A temporary password is generated for
root@localhost: e<hjlNprw7aj //localhost: 后面的为初始密码用于后面的密码初始化
[root@server5 mysql]# /etc/init.d/mysqld start
Starting MySQL. SUCCESS!
[root@server5 mysql]# /etc/init.d/mysqld stop
Shutting down MySQL.. SUCCESS!
[root@server5 mysql]# chgrp root . -R //更改组及用户
[root@test5 mysql]# ll
[root@server5 mysql]# chown mysql data/ -R //初始化及登陆
[root@server5 mysql]# /etc/init.d/mysqld start
Starting MySQL. SUCCESS!
如果出现以下情况:
[root@test5 mysql]# /etc/init.d/mysqld start
Starting MySQL....
ERROR! The server quit without updating PID file (/usr/local/lnmp/mysql/data/test5.pid).
执行:
[root@test5 mysql]# chown -R mysql:mysql /var/data
[root@test5 mysql]# chown -R mysql:mysql /usr/local/lnmp/mysql/data
[root@test5 mysql]# chmod -R 755 /usr/local/lnmp/mysql/data
[root@test5 mysql]# /etc/init.d/mysqld restart //重起服务,失败
ERROR! MySQL server PID file could not be found!
Starting MySQL... ERROR! The server quit without updating PID file (/usr/local/lnmp/mysql/data/test5.pid).
//解决方法:用命令“ps -ef|grep mysqld”查看是否有 mysqld 进程,如果有使用“kill -9 进程号”杀掉,然后启动 mysql
[root@test5 mysql]# ps -ef|grep mysqld //查看进程,杀掉 mysql 有关的进程
[root@test5 mysql]# /etc/init.d/mysqld start
Starting MySQL. SUCCESS!
[root@server5 mysql]# mysql_secure_installation //开启服务,成功
Securing the MySQL server deployment.
Enter password for user root: //这里输入初始密码
The existing password for the user account root has expired. Please set a new
password.
New password:
Re-enter new password: //输入你想设置的数据库密码
VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?
Press y|Y for Yes, any other key for No:
Using existing password for root.
Change the password for root ? ((Press y|Y for Yes, any other key for No) :
... skipping.
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL 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? (Press y|Y for Yes, any other key for No) : 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? (Press y|Y for Yes, any other key for No) : n
... skipping.
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? (Press y|Y for Yes, any other key for
No) :
... skipping.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) :
... skipping.
All done!
[root@server1 mysql]# mysql -p //登陆 mysql
[root@test5 mysql]# mysql -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
mysql> exit
Bye
PHP 源码安装
[root@test5 ~]# ls
cmake-2.8.12.2-4.el6.x86_64.rpm
libmcrypt-devel-2.5.8-9.el6.x86_64.rpm
php-5.6.35.tar.bz2
gd-devel-2.0.35-11.el6.x86_64.rpm
mysql-5.7.11
re2c-0.13.5-1.el6.x86_64.rpm
libmcrypt-2.5.8-9.el6.x86_64.rpm
mysql-boost-5.7.11.tar.gz
[root@test5 ~]# tar jxf php-5.6.35.tar.bz2
[root@test5 ~]# ls //下载依赖包
[root@test5 ~]# yum install -y libxml2-devel openssl-devel curl-devel gd-devel-2.0.35-11.el6.x86_64.rpm gmp-devellibmcrypt-2.5.8-9.el6.x86_64.rpm libmcrypt-devel-2.5.8-9.el6.x86_64.rpm net-snmp-devel
[root@test5 ~]# rpm -ivh re2c-0.13.5-1.el6.x86_64.rpm
[root@test5 ~]# cd php-5.6.35
[root@test5~]./configure --prefix=/usr/local/lnmp/php --with-config-file-path=/usr/local/lnmp/php/etc --with-mysql=mysqlnd --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-openssl --with-snmp --with-gd --with-zlib --with-curl --with-libxml-dir --with-png-dir --with-jpeg-dir --with-freetype-dir --with-pear --with-gettext --with-gmp --enable-inline-optimization --enable-soap --enable-ftp --enable-sockets --enable-mbstring --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx --with-mcrypt --with-mhash //编译第一步
遇到的问题及解决办法
问题 1:
checking whether to enable JIS-mapped Japanese font support in GD... no
If configure fails try --with-vpx-dir=<DIR>
configure: error: jpeglib.h not found.
解决:
yum -y install libjpeg-devel
再次编译
问题 2:
checking for jpeg_read_header in -ljpeg... yes
configure: error: png.h not found.解决:
yum install -y libpng-devel libpng
再次编译
问题 3:
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
configure: error: freetype-config not found.
解决:
[root@test5 php-5.6.35]# yum install -y freetype-devel
再次编译
最后编译成功
//可能遇到的其他问题:
问题 4:
No package xml2-config available.
Error: Nothing to do
解决:
[root@test5 php-5.6.35]# rpm -qa | grep libxml2
libxml2-python-2.7.6-14.el6.x86_64
libxml2-2.7.6-14.el6.x86_64
[root@test5 php-5.6.35]# yum install libxml2 libxml2-devel -y
问题 5:
configure: error: Please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/
解决:
[root@test5 php-5.6.35]# yum install curl curl-devel -y
问题 6:
configure: error: Could not find net-snmp-config binary. Please check your
net-snmp installation.
解决:
[root@test5 php-5.6.35]# yum -y install net-snmp-devel
[root@test5 php-5.6.35]# make && make install //编译第二步和第三步
配置部分:
[root@test5 ~]# cd /usr/local/lnmp/php/
[root@test5 php]# ls
bin etc include lib php sbin var
[root@test5 php]# cd etc/
[root@test5 etc]# ls
pear.conf php-fpm.conf php-fpm.conf.default php.ini
[root@test5 etc]# cp php-fpm.conf.default php-fpm.conf
cp: overwrite `php-fpm.conf'? y
[root@test5 etc]# cd /root/php-5.6.35
[root@test5 etc]# cp php.ini-production /usr/local/lnmp/php/etc/php.ini
[root@test5 etc]# cd /usr/local/lnmp/php/etc/
[root@test5 etc]# ls
pear.conf php-fpm.conf php-fpm.conf.default php.ini
[root@test5 etc]# vim php.ini //写时间
[root@test5 etc]# vim php-fpm.conf
//使第 25 行有效
[root@test5 etc]# useradd -M -d /usr/local/lnmp/nginx -s /sbin/nologin nginx //创建用户
[root@test5 php-5.6.35]# cd /root/php-5.6.35/sapi/fpm/
[root@test5 fpm]# file init.d.php-fpm //它是个脚本
init.d.php-fpm: POSIX shell script text executable
//[root@test5 fpm]# cp init.d.php-fpm /etc/init.d/php-fpm //将脚本文件传到默认脚本路径
[root@test5 fpm]# chmod +x /etc/init.d/php-fpm //给其可执行权限
[root@test5 fpm]# /etc/init.d/php-fpm start //执行文件
Starting php-fpm done
nginx 源码安装
需要的包
nginx-1.14.0.tar.gz
nginx-sticky-module-1.1.tar.gz
[root@test5 ~]# tar zxf nginx-sticky-module-1.1.tar.gz
[root@test5 ~]# tar zxf nginx-1.14.0.tar.gz
[root@test5 ~]# cd nginx-1.14.0
[root@test5 nginx-1.14.0]# ls
auto CHANGES CHANGES.ru conf configure contrib html LICENSE
man README src
[root@test5 nginx-1.14.0]# vim src/core/nginx.h //去掉 nginx 的版本号
[root@test5 nginx-1.14.0]# vim auto/cc/gcc //注释掉
[root@test5 nginx-1.14.0]# yum install pcre-devel -y
[root@test5 nginx-1.14.0]# ./configure --prefix=/usr/local/lnmp/nginx --with-http_ssl_module --with-http_stub_status_module
--user=nginx --group=nginx --with-threads --with-file-aio //同样,根据报错解决依赖性//编译成功
//编译成功
[root@test5 nginx-1.14.0]# make && make install
[root@test5 ~]# cd nginx-1.14.0
[root@test5 nginx-1.14.0]# cd /usr/local/lnmp/nginx/conf/
[root@test5 conf]# vim nginx.conf //加入 index.php 会默认首先访问 index.php
[root@test5 conf]# cd
[root@test5 ~]# vim .bash_profile
[root@test5 ~]# source .bash_profile //或者 ln -s /usr/local/lnmp/nginx/sbin/nginx /usr/local/sbin/ //做个软连接
[root@test5 ~]# cd /usr/local/lnmp/nginx/html/
[root@test5 html]# vim index.php
[root@test5 html]# nginx -t //检查 nginx 配置文件是否有错误
[root@test5 html]# nginx //开启 nginx 服务
在网页进行访问 172.25.1.5:
nginx 和 mysql 结合并安装论坛
[root@test5 ~]# unzip Discuz_X3.2_SC_UTF8.zip -d /usr/local/lnmp/nginx/html
[root@test5 ~]# cd /usr/local/lnmp/nginx/html/
[root@test5 html]# ls
50x.html bbs index.html index.php readme utility
[root@test5 html]# mv upload bbs
网页进行访问 172.25.1.5/bbs:
[root@test5 bbs]# chmod 777 config/ data/ uc_server/ uc_client/ -R //修改权限
执行下一步
数据库连接错误,执行:
[root@test5 bbs]# cd /usr/local/lnmp/php/etc/
[root@test5 etc]# vim php.ini
pdo_mysql.default_socket=/usr/local/lnmp/mysql/data/mysql.sock
mysql.default_socket =/usr/local/lnmp/mysql/data/mysql.sock
mysqli.default_socket =/usr/local/lnmp/mysql/data/mysql.sock
//分别是
[root@server5 etc]# /etc/init.d/php-fpm reload
[root@server5 etc]# cd /usr/local/lnmp/mysql/
[root@server5 mysql]# chmod 755 data/
//下一步
登陆论坛:
登陆成功
上面提示删除 index.php
故执行删除操作:
[root@server5 mysql]# cd data
[root@server5 data]# cd /usr/local/lnmp/nginx/html/bbs/install/
[root@server5 install]# ls
data images include index.php
[root@server5 install]# rm -f index.php
最后,论坛发布成。
相关文章:

NSString属性什么时候用copy,什么时候用strong?
我们在声明一个NSString属性时,对于其内存相关特性,通常有两种选择(基于ARC环境):strong与copy。那这两者有什么区别呢?什么时候该用strong,什么时候该用copy呢?让我们先来看个例子。 示例 我们定义一个类…

hihocoder 1152 Lucky Substrings
#1152 : Lucky Substrings 时间限制:10000ms单点时限:1000ms内存限制:256MB描述 A string s is LUCKY if and only if the number of different characters in s is a fibonacci number. Given a string consisting of only lower case letters, output all its lucky non-empt…

随笔,记2014忆往昔岁月
博客园开通了一年多,这是第一篇博客。在此记下我的第一篇博客,同时,回忆过去几年自己的工作所得所想所感。 大学毕业,工作两年半了,做过很多事,比较杂,做过需求,做过设计,…

PHP相关关系及定义
CGI(是一种协议): 是为了保证web server传递过来的数据是标准格式的,方便CGI程序的编写者。 web server(如nginx)是内容的分发者。 处理静态页面: 如果请求/index.html,web server就可以解…

Apache优化:修改最大并发连接数
http://www.365mini.com/page/apache-concurrency-configuration.htm Apache是一个跨平台的web服务器,由于其简单高效、稳定安全的特性,被广泛应用于计算机技术的各个领域。现在,Apache凭借其庞大的用户数,已成为用户数排名第一的…

黑马程序员___Java基础[02-Java基础语法](一)
Java语言基础组成 一、关键字 1)定义:被Java语言赋予了特殊含义的单词 2)特点:关键字中所有字母均为小写 3)作用及分类: 下面是Java语言保留专用的50个关键字: 用于定义数据类型的关键字(12个):…
NSLog打印自定义对象
我们在开发中,如果直接使用NSLog打印对象,则会打印对象的指针(如下图) 但我们常常希望打印的是对象的属性的值,因此我们需要重写自定义类的description方法(打印日志时,对象会收到description消…
数据库的安装与管理
数据库的安装与管理 1.mysql数据库的安装 yum install mariadb-server -y systemctl start mariadb ##开启数据库 netstat -antlupe | grep mysql ##查看端口 vim /etc/my.cnf ##修改配置文件。添加skip-networking1 systemctl restart mariadb ##重起服务 netstat -antlupe |…

SQL性能优化没有那么神秘
经常听说SQL Server最难的部分是性能优化,不禁让人感到优化这个工作很神秘,这种事情只有高手才能做。很早的时候我在网上看到一位高手写的博客,介绍了SQL优化的问题,从这些内容来看,优化并不都是一些很复杂的问题&…

腾讯云无法绑定公网IP问题解释与解决方案。
腾讯云无法绑定公网IP问题解释与解决方案。 http://blog.csdn.net/chenggong2dm/article/details/51475222 解释:公网IP并不直接配置在服务器上,而是在服务器外部的路由上,通过某种映射连接。 解决方案:绑定0.0.0.0 posted on 201…
iOS Category小举例
(一)Category作用:Category可以向已存在的类添加新的方法,或者覆盖原来类中已经存在的方法,从而扩展已有类(在Java中为了实现类似功能,一般是创建子类) (二)C…
memcache
nginxphpmemcache缓存 图解: [roottest5 ~]# /etc/init.d/iptables stop [roottest5 ~]# nginx [roottest5 ~]# /etc/init.d/php-fpm start Starting php-fpm done [roottest5 ~]# tar zxf memcache-2.2.5.tgz [roottest5 ~]# cd memcache-2.2.5 [roottest5…

iOS中KVO模式的解析与应用
最近老翁在项目中多处用到了KVO,深感这种模式的好处。现总结如下: 一、概述 KVO,即:Key-Value Observing,它提供一种机制,当指定的对象的属性被修改后,则对象就会接受到通知。简单的说就是每次指定的被观察…

C 到C++的升级
C所有的变量都可以在需要使用时再定义。 C语言中的变量都必须在作用域开始的位置定义。 register 关键字请求编译器将局部变量存储于寄存器中 在C语言无法获取register 变量的地址 在C中可以取得 register 变量的地址 C编译器有自己的优化方式,所以几乎不用registe…

SET QUOTED_IDENTIFIER OFF语句的作用
先看下面几个sql语句 1SETQUOTED_IDENTIFIER ON2SELECT*FROM"USER" WHEREanetasp34SETQUOTED_IDENTIFIER ON5SELECT*FROM[USER]WHEREanetasp67SETQUOTED_IDENTIFIER OFF8SELECT*FROM[USER]WHEREa"netasp" 910SETQUOTED_IDENTIFIER OFF11SELECT*FROM[USE…
proxy实现 mysql 读写分离
实现 mysql 读写分离 图解: 环境: iptables 和 selinux 关闭 proxy:test2 172.25.1.2 Master: test3 172.25.1.3 Slave:test4 172.25.1.4 环境已经实现 test3(master) 和 test4(slave) 的主从复制 Server2: [roottest2 ~]# ls mysql-proxy-0.8.5-linux-el6-x86-64bit.tar.gz …

iOS开发中用到的一些第三方库
下面是我在开发中用到的一些优秀的iOS第三方开源库: 1.AFNetworking(网络请求,类似的还有ASIHTTPRequest) https://github.com/AFNetworking/AFNetworking/ 2.MBProgressHUD(提示框) https://github.…

小图标外链API
网页上有些分享的小图标,比如分享到facebook,weibo,qq空间等功能的时候,图标以前一般是自己做一个css sprite。当一个网站的图标变了的时候,比如facebook变成assbook的时候,你就要修改这个css sprite。费时…

转载JQuery 获取设置值,添加元素详解
转载原地址 http://www.cnblogs.com/0201zcr/p/4782476.html jQuery 获取内容和属性 jQuery DOM 操作 jQuery 中非常重要的部分,就是操作 DOM 的能力。 jQuery 提供一系列与 DOM 相关的方法,这使访问和操作元素和属性变得很容易。 提示:DOM …
mysql 主从复制 和基于gtid的mysql主从复制
主从复制 原理: mysql 无需借助第三方工具,而是其自带的同步复制功能,另外一点,mysql 的主从 复制并不是从硬盘给上文件直接同步,而是逻辑的 binlog 日志同步到本地的应用执行的过 程。 数据从一个 mysql 数据库(master)复制到另一个 mysql 数据库(slave),在 master 与 slave …

使用read write 读写socket
一旦,我们建立好了tcp连接之后,我们就可以把得到的fd当作文件描述符来使用。 由此网络程序里最基本的函数就是read和write函数了。 写函数: ssize_t write(int fd, const void*buf,size_t nbytes); write函数将buf中的nbytes字节内容写入文件…
iOS从通讯录中选择联系人
有时候APP需要用户输入一位联系人的姓名和电话,除了用户手动输入,一般也允许用户从通讯录中选择一位联系人(图1),下面的代码就是使用系统的<AddressBookUI/AddressBookUI.h>库实现这一需求。 图1 完整代码&…

document.readystate
http://www.cnblogs.com/lhb25/archive/2009/07/30/1535420.html http://www.cnblogs.com/haogj/archive/2013/01/15/2861950.html http://jincuodao.baijia.baidu.com/article/2896 电视转载于:https://www.cnblogs.com/daishuguang/p/3523783.html

Openstack安装部署
系统版本 rhel7.4 关闭 iptables 关闭 selinux foundation1: 172.25.254.1 server1: 172.25.254.11 server2: 172.25.254.12 可参考:https://docs.openstack.org/mitaka/zh_CN/install-guide-rdo/ //选择的mitaka 虚拟机上网 首先物理机必须可…

在Xcode中使用Git进行源码版本控制
本文翻译自Understanding Git Source Control in Xcode (译者myShire)欢迎您加入我们的翻译小组。 在应用程序开发过程中,很重要的一部分工作就是如何进行源码的版本控制。当代码出现问题时,我们就需要将代码恢复到原先正常的版本…

敏捷开发之道(二)极限编程XP
上次的博文敏捷开发之道(一)敏捷开发宣言中,我们介绍了一下敏捷开发宣言,在其中,我们了解到了关于敏捷开发的几个重要的价值观。今天我们来了解一个敏捷开发的方法——极限编程XP 1、介绍 极限编程(eXtreme…

spring 3.X与jdk 1.8不兼容
1、报错(部分) 2、解决 虽然Spring的jdk要求如下,但是spring 3与jdk1.8不兼容(使用的是spring 3.2) 在eclipse将jdk版本下调。这里将JDK调到1.7(在eclipse如下设置) 同时,需要设置服…

rhel-server-7.5-x86_64-dvd.iso镜像下载及rar压缩包的解压
主机名为server1 [rootserver1 ~]# ls rhel-server-7.5-x86_64-dvd.part1.rar rarlinux-5.6.1.tar.gz rhel-server-7.5-x86_64-dvd.part2.rar 1、如果没有rarlinux-5.6.1.tar.gz包可以去 https://www.rarlab.com/download.htm 这个网站下载RAR 5.61 for Linux 或者RAR 5.…
Expandable Table的Demo
在网上看到一个可点击cell展开的TableView的demo,原文是swift语言,我写了个oc版,有兴趣的朋友可以看下: 效果: oc源码(带中文注释):http://download.csdn.net/detail/dolacmeng/941…

Java对多线程的支持
Java运行时系统实现了一个用于调度线程执行的线程调度器,用于确定某一时刻由哪一个线程在CPU上运行。在Java技术中,线程通常是抢占式的而不需要时间片分配进程(分配给每个线程相等的CPU时间的进程)。抢占式调度模型就是许多线程处…