ubuntu 部署开发环境(eclipse, VS code,sublime text 3,tomcat)

VS CODE(Python,php,java)

su

cd 到目录

dpkg -i vs*.deb

sublime text 3(参考 http://www.sublimetext.com/docs/3/linux_repositories.html)

wget -qO – https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add –
apt install apt-transport-https
​echo “deb https://download.sublimetext.com/ apt/stable/” | sudo tee /etc/apt/sources.list.d/sublime-text.list
apt-get update
apt-get install sublime-text

eclipse和tomcat

​要确定JDK是否有安装(可以参考NetBeans with JDK 8)
apt install default-jre

只需要直接解压文件,运行eclipse即可。

ubuntu 安装deb (wps,qq,搜狗输入法)

指令篇

su

进入超级管理员

cd 到文件目录

dpkg -i iptux.deb#安装iptux.deb软件包(其中-i等价于–install)如果报错或者需要支持库

apt -f install

图形篇

右键使用gdebi打开。

QQ需要先

ttf和fonts

wine的关联gdebi会进行安装

wps和qq直接指令或者gdebi安装即可​

最后注意:32位和64位

ubuntu 改为阿里云源

为了提高下载和更新速度

要把默认的Xubuntu源改为阿里云源

切换后需要 sudo apt update 更新源

中文

设置-》软件和更新-》

下载自

其他站点

中国

选择aliyun.com

使用指令

cp /etc/apt/source.list /etc/apt/source.list.backup

vi /etc/apt/source.list

vi使用,按d是删除行,按i是插入。先d删除全部内容然后按i复制一下内容,然后按: 输入qw!

# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ – Release amd64 (20160420.1)]/ xenial main restricted

deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted

deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ xenial universe

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe

deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse

deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse

deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties

deb http://archive.canonical.com/ubuntu xenial partner

deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties

deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe

deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse

centos 更换国内 阿里云 源(提高速度)

CentOS 5

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

CentOS 6

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

CentOS 7

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

然后进行一个
yum makecache

webrtc(HUBL)+HTTPS. 小型视频会议系统

参考
https://yeasy.gitbooks.io/docker_practice/content/install/centos.html
https://github.com/linagora/hublin
https://github.com/docker/compose/releases/tag/1.14.0
https://github.com/linagora/hublin/issues/70

使用了
Hubl.in
docker
Python

安装Docker
curl -sSL https://get.docker.com/ | sh
安装Docker Compose(感觉无用)
curl -L https://github.com/docker/compose/releases/download/1.14.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

手动安装Hubl

# get mongo and start it as a container named ‘db’
docker pull mongo
docker run -d –name db mongo

docker pull redis
docker run -d –name redis redis

screen

# start hubl.in
docker run -p 8080:8080 –link db:db –link redis:redis linagora/hublin

到这里hubl.in 安装完毕了, 端口在8080.

只需要一台有SSL的主机, 来反向代理这个端口即可.

Centos 128m小内存VPS 优化

删除垃圾

yum remove Deployment_Guide-en-US finger cups-libs cups bluez-libs desktop-file-utils ppp rp-pppoe wireless-tools irda-utils nfs-utils nfs-utils-lib rdate fetchmail eject ksh mkbootdisk mtools syslinux tcsh startup-notification talk apmd rmt dump setserial portmap yp-tools ypbind

yum remove telnet rsh ftp rcp

更换

yum install postfix
yum remove sendmail
/sbin/chkconfig postfix off

不需要的 xinetd 服务。

/sbin/service xinetd stop; /sbin/chkconfig xinetd off
rm -rf /etc/xinetd.d

Nginx配置

user www www

worker_processes 1;

events {
worker_connections 1024;
use epoll; #使用高效率的epool模式
}

http {
include mime.types;
default_type application/octet-stream;

sendfile on;
keepalive_timeout 65

# 下面是配置缓存
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;

fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 32k;
fastcgi_buffers 4 32k;
fastcgi_busy_buffers_size 32k;
fastcgi_temp_file_write_size 32k;

# 下面是弃用gzip压缩缓存
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;

Mysql

[mysql]
no-auto-rehash

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

open_files_limit = 600
back_log = 20
max_connections = 100
max_connect_errors = 200
table_cache = 60
external-locking = FALSE
max_allowed_packet = 16M
sort_buffer_size = 128K
join_buffer_size = 128K
thread_cache_size = 10
thread_concurrency = 8
query_cache_size = 0M
query_cache_limit = 2M
query_cache_min_res_unit = 2k
default_table_type = MyISAM
thread_stack = 192K
transaction_isolation = READ-UNCOMMITTED
tmp_table_size = 512K
max_heap_table_size = 32M
long_query_time = 1
log_long_format
server-id = 1
binlog_cache_size = 2M
max_binlog_cache_size = 4M
max_binlog_size = 512M
expire_logs_days = 7
key_buffer_size = 4M
read_buffer_size = 1M
read_rnd_buffer_size = 2M
bulk_insert_buffer_size = 2M
myisam_sort_buffer_size = 4M
myisam_max_sort_file_size = 10G
myisam_max_extra_sort_file_size = 10G
myisam_repair_threads = 1
myisam_recover

skip-innodb #禁用innodb数据库引擎

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[mysqldump]
quick
max_allowed_packet = 16M

PHP
listen = /var/run/php-cgi.sock #使用socket监听,不用端口监听
pm.max_children = 2 #默认是50
pm.start_servers = 2 #默认是20
pm.min_spare_servers = 2 #默认是5
pm.max_spare_servers = 2 #默认是35

Vesta (VPS控制面板)最小化安装 PHP+Sqlite

curl -O http://vestacp.com/pub/vst-install.sh

 

bash vst-install.sh –nginx yes –phpfpm yes –apache no –vsftpd yes –proftpd no –exim no –dovecot no –spamassassin no –clamav no –named no –iptables yes –fail2ban no –mysql no –postgresql no –remi yes –quota no

 

yum install sqlite sqlite3 php-sqlite

 

reboot