2、windows服务器在内网,在windows的前面放置了一台Linux服务器,然后用nginx做的反向代理
3、visual svn server 使用的是8080端口,配置nginx反向代理文件
在svn提交的时候报错 Unexpected HTTP status 413 'Request Entity Too Large' on
是因为nginx配置反向代理时候,client_max_body_size 不够大导致的。
修改nginx反向代理的配置文件
vim /etc/resolvconf/resolv.conf.d/head
[root@www ~]# iptables [-t tables] [-L] [-nv] 选项与参数: -t :后面接 table ,例如 nat 或 filter ,若省略此项目,则使用默认的 filter -L :列出目前的 table 的规则 -n :不进行 IP 与 HOSTNAME 的反查,显示讯息的速度会快很多! -v :列出更多的信息,包括通过该规则的封包总位数、相关的网络接口等 范例:列出 filter table 三条链的规则 [root@www ~]# iptables -L -n Chain INPUT (policy ACCEPT) <==针对 INPUT 链,且预设政策为可接受 target prot opt source destination <==说明栏 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED <==第 1 条规则 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 <==第 2 条规则 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 <==第 3 条规则 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22 <==以下类推 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT) <==针对 FORWARD 链,且预设政策为可接受 target prot opt source destination REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT) <==针对 OUTPUT 链,且预设政策为可接受 target prot opt source destination 范例:列出 nat table 三条链的规则 [root@www ~]# iptables -t nat -L -n Chain PREROUTING (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
1
2
3
4
5
6
7
8
| sudo vim /etc/init/failsafe .conf $PLYMOUTH message --text= "Waiting for network configuration..." || : sleep 1 $PLYMOUTH message --text= "Waiting up to 60 more seconds for network configuration..." || : sleep 1 |
openssh-server
during the install procedure or install subsequently depending on your needs).openssh-server
package (so we can connect to it remotely) and denyhosts
to add a degree of brute-force attack protection. There are other protection applications available: I’m not saying this one is the best, but it’s one that works and is easy to configure and manage. If you don’t already, it’s also worth looking at setting up key-based ssh access, rather than relying on passwords. This can also help to limit the potential of brute-force attacks. [NB: This isn't a How To on securing your server...]sudo apt-get install openssh-server denyhosts
sudo apt-get update
sudo apt-get dist-upgrade
sudo adduser --system --home=/opt/openerp --group openerp
/bin/false
) and has logins disabled. Note that I’ve specified a “home” of/opt/openerp
, this is where the OpenERP server code will reside and is created automatically by the command above. The location of the server code is your choice of course, but be aware that some of the instructions and configuration files below may need to be altered if you decide to install to a different location.sudo su - openerp -s /bin/bash
su
your current terminal login to the openerp user (the “-
” between su
and openerp
is correct) and use the shell /bin/bash
. When this command is run you will be in openerp’s home directory: /opt/openerp
.exit
.sudo apt-get install postgresql
sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
Enter password for new role: ********
Enter it again: ********
exit
sudo apt-get install python-dateutil python-docutils python-feedparser python-gdata \
python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid \
python-psycopg2 python-psutil python-pybabel python-pychart python-pydot python-pyparsing \
python-reportlab python-simplejson python-tz python-unittest2 python-vatnumber python-vobject \
python-webdav python-werkzeug python-xlwt python-yaml python-zsi
wget
for this sort of thing and I download the files to my home directory.deb
, rpm
and exe
builds in this area too). There isn’t a static 7.0 release tarball as such anymore, but there is a nightly build of the 7.0 source tree which should be just as good and will contain patches as and when things get fixed. The link below is to the source tarball for the 7.0 branch.wget http://nightly.openerp.com/7.0/nightly/src/openerp-7.0-latest.tar.gz
cd
to the /opt/openerp/
directory and extract the tarball there.cd /opt/openerp
sudo tar xvf ~/openerp-7.0-latest.tar.gz
sudo chown -R openerp: *
sudo cp -a openerp-7.0 server
/opt/openerp/server/install/
) is actually very minimal and will, with only one small change work fine so we’ll simply copy that file to where we need it and change it’s ownership and permissions:sudo cp /opt/openerp/server/install/openerp-server.conf /etc/
sudo chown openerp: /etc/openerp-server.conf
sudo chmod 640 /etc/openerp-server.conf
db_password = False
to the same password you used back in step 3. Use your favourite text editor here. I tend to use nano, e.g.sudo nano /etc/openerp-server.conf
openerp-server.conf
file:logfile = /var/log/openerp/openerp-server.log
sudo su - openerp -s /bin/bash
/opt/openerp/server/openerp-server
On my system I noticed the following warning:2012-12-19 11:53:51,613 6586 WARNING ? openerp.addons.google_docs.google_docs: Please install latest gdata-python-client from http://code.google.com/p/gdata-python-client/downloads/list
The Ubuntu 12.04 packaged version of the python gdata client library is not quite recent enough, so to install a more up-to-date version I did the following (exit from the openerp user’s shell if you are still in it first):sudo apt-get install python-pip
sudo pip install gdata --upgrade
Going back and repeating the commands to start the server resulted in no further warningssudo su - openerp -s /bin/bash
/opt/openerp/server/openerp-server
CTL+C
to stop the server and then exit
to leave the openerp user account and go back to your own shell./opt/openerp/server/install/openerp-server.init
but this will need a few small modifications to work with the system installed the way I have described above. Here’s a link to the one I’ve already modified for 7.0./etc/init.d/
and call it openerp-server
. Once it is in the right place you will need to make it executable and owned by root:sudo chmod 755 /etc/init.d/openerp-server
sudo chown root: /etc/init.d/openerp-server
sudo mkdir /var/log/openerp
sudo chown openerp:root /var/log/openerp
sudo /etc/init.d/openerp-server start
less /var/log/openerp/openerp-server.log
http://IP_or_domain.com:8069
/etc/openerp-server.conf
file; hence why we restricted access to just openerp and root. When you change and save the new password the /etc/openerp-server.conf
file will be re-written and will have a lot more options in it.sudo /etc/init.d/openerp-server stop
sudo update-rc.d openerp-server defaults
ps aux | grep openerp
you should see a line similar to this:openerp 1491 0.1 10.6 207132 53596 ? Sl 22:23 0:02 python /opt/openerp/server/openerp-server -c /etc/openerp-server.conf