关键字:软件开发、常用工具、免费
时间:2017年6月
用途 | 软件名称 | 是否收费 | 操作系统 |
---|---|---|---|
产品构思 | XMind | 免费 | macOS/Windows |
产品原型设计 | Pencil | 免费 | macOS/Windows |
图像处理 | GIMP | 免费 | Linux/macOS/Windows |
系统架构设计 | Pencil | 免费 | macOS/Windows |
数据库设计 | ERDesigner NG | 免费 | Windows |
关键字:软件开发、常用工具、免费
时间:2017年6月
用途 | 软件名称 | 是否收费 | 操作系统 |
---|---|---|---|
产品构思 | XMind | 免费 | macOS/Windows |
产品原型设计 | Pencil | 免费 | macOS/Windows |
图像处理 | GIMP | 免费 | Linux/macOS/Windows |
系统架构设计 | Pencil | 免费 | macOS/Windows |
数据库设计 | ERDesigner NG | 免费 | Windows |
关键字:golang、tcp、tcpserver、框架
时间:2017年6月
各种语言tcp服务器端都有如下的经典入门代码
listen() while(1) { accept() new thread() }
这样的代码仅仅只能用于学习tcp的接收和发送等基本使用方法。由于线程间切换带来的开销,使得这段代码无法用于大规模TCP连接的场景。当面对大规模TCP连接时,必须引入“非阻塞”、“select”等模型和概念。go语言的并行机制让这样的经典代码可以用于大规模TCP连接的场景。
package main import ( "fmt" "net" ) func handleConnection(conn net.Conn) { defer conn.Close() buf := make([]byte, 1024) for { n, err := conn.Read(buf) if err != nil { fmt.Println("[Error]", err.Error()) break } // Do something here! fmt.Println("Read:", string(buf[0:n])) } } func main() { listen, err := net.Listen("tcp", ":9999") // 监听任意ip的9999端口 if err != nil { fmt.Println("[Error]", err.Error()) return } defer listen.Close() for { conn, err := listen.Accept() if err != nil { fmt.Println("[Error]", err.Error()) continue } fmt.Println("[INFO]", conn.RemoteAddr().String(), " connected.") go handleConnection(conn) // 并行处理连接 } }
关键字:私有、IP、建议、规划、案例
时间:2017年6月
地址范围及建议
IP地址规划注意事项
案例
类别 | 范围 | 范围 | 地址数量 | 使用建议 |
---|---|---|---|---|
A | 10.0.0.0~10.255.255.255 | 10.0.0.0/8 | 16777216 | 数据中心 |
B | 172.16.0.0~172.31.255.255 | 172.16.0.0/12 | 1048576 | 办公室 |
C | 192.168.0.0~192.168.255.255 | 192.168.0.0/16 | 65535 | 家庭 |
1、子网选择要避免与出口IP冲突;
2、结合地形划分子网,例如:楼层等;
3、控制单个子网的设备数量,避免广播风暴,通过路由器解决设备数量问题;
4、办公室等场景,建议每个工位预留2至3个IP,主要考虑台式机、笔记本、手机等同时使用的情况。
区域 | 功能 | 工位数量 | IP分配 |
---|---|---|---|
5楼 | 机房 | – | 172.16.0.0/24、172.16.1.0/24 |
办公室 | 90 | 172.16.2.0/24 | |
6楼 | 办公室 | 150 | 172.16.3.0/24、172.16.4.0/24 |
7楼 | 办公室 | 150 | 172.16.5.0/24、172.16.6.0/24 |
关键字:opencart、安装、linux、2.3.0.2
时间:2017年
1. 运行环境介绍
2. 操作系统准备
3. 安装apache2和php5
4. 配置apache2
5. 下载opencart
6. 解压与拷贝
7. 修改配置文件名
8. 进入安装页面
9. 安装php扩展
10. 修改配置文件权限
11. 修改其他文件权限
12. 浏览器继续安装
13. 安装mysql
14. 配置mysql
15. 安装php的mysql扩展
16. 浏览器继续安装
17. 完成并清理安装目录
项目 | 版本 | 备注 |
---|---|---|
debian | 8.7.1 | |
apache2 | 2.4.10 | |
php5 | 5.6.30 | |
mysql | 5.5.55 | |
opencart | 2.3.0.2 | 多语言版 |
操作系统安装请参考其他文章。
root@debian:~# apt-get update root@debian:~# apt-get install php5 apache2
root@debian:~# vim /etc/apache2/site-enabled/000-default.conf ... #DocumentRoot /var/www/html DocumentRoot /var/www ... root@debian:~# systemctl restart apache2
下载页面地址:http://www.opencartchina.com/download.html
root@debian:~# wget https://github.com/mycncart/opencart_international/archive/opencart_international_2.3.0.2.zip
root@debian:~# apt-get install unzip root@debian:~# unzip opencart_international_2.3.0.2.zip root@debian:~# cp -r opencart_international-opencart_international_2.3.0.2/* /var/www/
root@debian:~# cd /var/www root@debian:/var/www# mv config-dist.php config.php root@debian:/var/www# mv admin/config-dist.php admin/config.php
浏览器打开:http://你服务器的ip地址/
“1/4 License agreement”页面,点击continue按钮。
“2/4 Pre-Installation”页面,有许多检查项未通过,回到linux。
root@debian:/var/www# apt-get install php5-gd php5-curl php5-mcrypt root@debian:/var/www# systemctl reload apache2
root@debian:/var/www# chown www-data:www-data /var/www/config.php root@debian:/var/www# chown www-data:www-data /var/www/admin/config.php
root@debian:/var/www# chown www-data:www-data /var/www/image/ root@debian:/var/www# chown www-data:www-data -R /var/www/image/cache/ root@debian:/var/www# chown www-data:www-data -R /var/www/image/catalog/ root@debian:/var/www# chown www-data:www-data -R /var/www/system/storage/cache/ root@debian:/var/www# chown www-data:www-data -R /var/www/system/storage/logs/ root@debian:/var/www# chown www-data:www-data -R /var/www/system/storage/download/ root@debian:/var/www# chown www-data:www-data -R /var/www/system/storage/upload/ root@debian:/var/www# chown www-data:www-data -R /var/www/system/storage/modification/
“2/4 Pre-Installation”页面,刷新,所有检查项通过。
“3/4 Configuration”页面,
mysql安装请参考其他文章。
root@debian:/var/www# mysql -uroot -p mysql> create database shop001 default charset=utf8; mysql> use mysql; mysql> grant all privileges on shop001.* to opencart@'%' identified by '123456';
root@debian:/var/www# apt-get install php5-mysql root@debian:/var/www# systemctl restart apache2
1. Please enter your database connection details.
DB Driver: mPDO
Hostname: localhost
Username: opencart
Password: 123456
Database: shop001
Port: 3306
Prefix: oc_
2. Please enter a username and password for the administration.
Username: admin
Passsword: abcd1234
E-mail: webmaster@xx.com
4/4Installation complete
root@debian:/var/www# rm -r install/