
sudo mkdir /server cd /server sudo mkdir site sudo mkdir bf2 sudo apt-get install apache2 apache2-mpm-prefork apache2-utils apache2-suexec libapache-asp-perl php5 php5-mysql libapache2-mod-php5 php-pear mysql-server mysql-client libmysqlclient15-dev sudo nano /etc/apache2/sites-available/default <VirtualHost .IP.:80> ServerAdmin somemail@some.ru ServerName .IP. ServerAlias .IP. DocumentRoot /server/site ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ </VirtualHost> /server/site . sudo wget ///bf2-linuxded-1.5.3153.0-installer.sh sudo chmod +x bf2-linuxded-1.5.3153.0-installer.sh sudo ./bf2-linuxded-1.5.3153.0-installer.sh sudo nano /server/bf2/mods/bf2/settings/serversettings.con sv.serverName "" // sv.password "" // sv.internet 1 // 1, . sv.serverIP "XX.XX.XX.XX" // sv.serverPort 16567 // sv.welcomeMessage "" // sv.punkBuster 1 // punkBuster sv.ticketRatio 100 // 100 sv.roundsPerMap 3 // sv.timeLimit 1800 // , 1800 = 30 sv.scoreLimit 0 // sv.autoBalanceTeam 1 // sv.useGlobalRank 1 sv.useGlobalUnlocks 1 // . sv.friendlyFireWithMines 1 // mysql -u root -p CREATE DATABASE `bf2stats` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; sudo nano /server/bf2/python/bf2/BF2StatisticsConfig.py =========================================================== # ------------------------------------------------------------------------------ # Backend Web Server # ------------------------------------------------------------------------------ http_backend_addr = '.IP.' http_backend_port = 80 http_backend_asp = '/ASP/bf2statistics.php' # ------------------------------------------------------------------------------ # Player Manager # ------------------------------------------------------------------------------ pm_backend_pid_manager = 1 pm_local_pid_txt_file = 'python/bf2/pid.txt' # Relative from BF2 base folder pm_ai_player_addr = '.IP.' # Not recommended to change sudo chmod 777 -R /server/site sudo nano /server/site/sys-games/ASP/system/config/config.php =============================================================== $db_host = '.IP.'; # $db_name = 'bf2stats'; # $db_user = 'root'; # $db_pass = 'my_pass'; # $admin_user = 'admin'; # $admin_pass = 'admin_password'; # $admin_hosts = array('127.0.0.1','.IP./'); # IP IP Web- $stats_lan_override = '.IP.'; $stats_local_pids = array('LocalPlayer01','.IP.','LocalPlayer02','.IP.'); $game_hosts = array('127.0.0.1','.IP.','.IP./24'); # IP- . . .ip./ASP .ip./ASP . The admin panel will open, go with the credentials that you entered when editing the configuration file. In the left menu, click Install DB ..ip. .ip. . The stats server web page installation page will open, follow the instructions of the installation script. sudo nano /server/site/config.inc.php ====================================================== $DBIP = 'localhost'; // $DBNAME = 'bf2stats'; // $DBLOGIN = 'root'; // $DBPASSWORD = ''; // $TITLE = ''; // sudo apt-get install iptables sudo nano /etc/network/if-up.d/upstart iptables -A INPUT -m udp -p udp --sport 29910 -s 0/0 -j DROP iptables -A INPUT -m udp -p udp --sport 139 -s 0/0 -j DROP iptables -A INPUT -m tcp -p tcp --sport 29910 -s 0/0 -j DROP iptables -A INPUT -m tcp -p tcp --sport 1433 -s 0/0 -j DROP iptables -A INPUT -m tcp -p tcp --sport 1434 -s 0/0 -j DROP iptables -A INPUT -m tcp -p tcp --sport 139 -s 0/0 -j DROP sudo nano /server/bf2/mods/bf2/settings/maplist.con ===================================================== //mapList.append _ _ _ mapList.append mashtuur_city gpm_cq 16 mapList.append road_to_jalalabad gpm_cq 16 mapList.append sharqi_peninsula gpm_cq 16 .IP. bf2web.gamespy.com cd /server/bf2 ./start.sh sudo screen cd /server/bf2 ./start.sh Source: https://habr.com/ru/post/149947/
All Articles