Page 1 of 4 123 ... LastLast
Results 1 to 10 of 35

Thread: [CoD2] Install CoD2 on your VDS much faster!

  1. #1
    Private Lonsofore's Avatar
    Join Date
    Oct 2016
    Posts
    77
    Thanks
    79
    Thanked 32 Times in 22 Posts

    [CoD2] Install CoD2 on your VDS much faster!

    Hello, Killtube!
    I think, everyone know this thread from IzNoGoD. It's a great tutorial and whole Killtube can agree with me, I think (because everyone give link on this thread to beginners). I like it, but... few days ago I changed my hosting and not only once (thank you, good russian hosters). And after another installation I already had a file with commands from that thread (and some else). So, it was a story, now I wanna show you the main subject of this thread :)


    About:
    I created .sh file, which can install ALL what you need for CoD2 (if it's not all - let's modify it together).
    I measured the time from VDS purchase to full CoD2 installation with this .sh and it's less than 10 minutes (with uploading all cod2 files!).
    So, any beginner, even he doesn't know anything about Linux can install CoD2 server on Linux now!


    So, what does this do:
    All what you need to start cod2 server(s):
    • Updating and upgrading packets
    • Install all libs for cod2
    • Install some tools, which you will need (git ssh scp nano make screen zip unzip perl aria2 geoip-bin man-db sqlite sshpass)
    • Ask you to install no-ip client (for dynamic dns. you will need this for gametracker.com)
    • Ask you to install web-server (lighttpd or apache2 - on your own)
    • Ask you to install phpmyadmin (only if you installed web-server)
    • Creates new user for cod2 (will ask you about name)
    • Creates all cod2 folders for all versions (it will use links, so you don't have to have main files for all versions)
    • Ask you to upload main files by yourself or download it from my link or download it from torrent!
    • Install the latest version of libcod (from VoroN's repo)
    • Install cod2_lnxded for all versions
    • Install YOUR servers for each version (ask you about your sh name, fs_game, config name, cracked and port)
    • Make .sh files to launch your servers (for all CoD2 versions, what you need)



    cod2_lnxded versions:
    This is the latest patched versions of CoD2 servers (from this thread):
    • 1.0: cod2_lnxded_1_0a
    • 1.2: cod2_lnxded_1_2c_patch_va_loc
    • 1.3: cod2_lnxded_1_3_patch_va_loc



    And what do you need to start it:
    0. Get VDS with Ubuntu 14.04 or 16.04 and log in as root there.
    1. On command line, type in the following commands:
    PHP Code:
    apt-get update
    apt
    -get install git -y
    git 
    clone https://github.com/lonsofore/cod2install
    cd cod2install
    ./start.sh 
    2. Enter your info, when it will ask!


    Few tips:
    • All server files you should upload in ~/cod2/servers/
    • All your maps you should upload in ~/cod2/Library/fs_game/ (fs_game of your server)
    • To start your servers open a folder cod2_1_0 or cod2_1_2 or cod2_1_3 and launch it with ./name.sh (there name is the name of your server sh file)
    • You can update libcod very fast - just launch parts/libcod.sh (from cod2install folder)
    • You also can manage your servers faster. To add a new server - use parts/servers.sh (from cod2install folder also)



    Some screenshots:
    Click image for larger version. 

Name:	42d96afebe4545f999f771314ff8b734[1].png 
Views:	205 
Size:	4.0 KB 
ID:	1342
    Click image for larger version. 

Name:	5ea65cb5f0aa478bbddd21aa27458945[1].png 
Views:	204 
Size:	8.3 KB 
ID:	1343


    Github link
    Let me know about mistakes and tell me please if download link is broken.
    Last edited by Lonsofore; 26th February 2018 at 23:36.

  2. The Following 3 Users Say Thank You to Lonsofore For This Useful Post:

    kung foo man (23rd April 2017),lamakak (30th June 2017),YuriJurek (23rd April 2017)

  3. #2
    Private First Class YuriJurek's Avatar
    Join Date
    Jun 2013
    Posts
    219
    Thanks
    152
    Thanked 88 Times in 47 Posts
    Love this idea, will have to check it out later, but it's a great asset for people that are just starting with cod2.

  4. The Following User Says Thank You to YuriJurek For This Useful Post:

    Lonsofore (23rd April 2017)

  5. #3
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,569
    Thanks
    17
    Thanked 916 Times in 570 Posts
    Please add an apt-get update to your list of commands. Most templated vps installs come with such outdated crappy stuff that even the apt list is outdated, which makes the apt-get install git fail.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

    Sending me a private message makes me want to help you LESS.

  6. The Following 2 Users Say Thank You to IzNoGoD For This Useful Post:

    kung foo man (24th April 2017),Lonsofore (23rd April 2017)

  7. #4
    Private Lonsofore's Avatar
    Join Date
    Oct 2016
    Posts
    77
    Thanks
    79
    Thanked 32 Times in 22 Posts
    Quote Originally Posted by IzNoGoD View Post
    Please add an apt-get update to your list of commands. Most templated vps installs come with such outdated crappy stuff that even the apt list is outdated, which makes the apt-get install git fail.
    You're right. Done, thank you :)

    And I have a question to Killtube. I need a file hosting with direct download (to place main files there). Any ideas?
    Or maybe somebody can place a miror on his server? Already did it on my server, but one link isn't good enough, I think.
    Last edited by Lonsofore; 23rd April 2017 at 18:48.

  8. #5
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    1,950
    Thanks
    1,838
    Thanked 1,055 Times in 732 Posts
    I just wonder if there are legal troubles to distribute the .iwd's

    What I would like is a torrent system, that every VPS admin can leech them and - via question - decide to seed it aswell. That would more or less distribute the load evenly

    For the end user, that would be an option less to choose from ("Which server you wanna download from?") and faster (multiple downloads same time). And since all package managers got some torrent clients, it wouldn't even be so hard to set up probably via .sh script... just the legal question tho
    timescale 0.01

  9. The Following User Says Thank You to kung foo man For This Useful Post:

    Lonsofore (24th April 2017)

  10. #6
    Brigadier General
    Join Date
    Dec 2012
    Posts
    988
    Thanks
    436
    Thanked 164 Times in 126 Posts
    http://sv02.bitlimit.com/cod2/main/

    Here are all the iwds located

  11. The Following User Says Thank You to Ni3ls For This Useful Post:

    Lonsofore (24th April 2017)

  12. #7
    Private Lonsofore's Avatar
    Join Date
    Oct 2016
    Posts
    77
    Thanks
    79
    Thanked 32 Times in 22 Posts
    Quote Originally Posted by kung foo man View Post
    I just wonder if there are legal troubles to distribute the .iwd's

    What I would like is a torrent system, that every VPS admin can leech them and - via question - decide to seed it aswell. That would more or less distribute the load evenly

    For the end user, that would be an option less to choose from ("Which server you wanna download from?") and faster (multiple downloads same time). And since all package managers got some torrent clients, it wouldn't even be so hard to set up probably via .sh script... just the legal question tho
    I very like this idea. I'll try to do it soon :)


    Quote Originally Posted by Ni3ls View Post
    http://sv02.bitlimit.com/cod2/main/

    Here are all the iwds located
    There is a problem with iw_15. It's different in 1.2 and 1.3, as I know.

    Maybe I should ask about CoD2 versions before install...

  13. The Following User Says Thank You to Lonsofore For This Useful Post:

    kung foo man (24th April 2017)

  14. #8
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,569
    Thanks
    17
    Thanked 916 Times in 570 Posts
    Time to pick apart a git repo. Note that I like the idea of this stuff, but there's a lot of stuff that could be done better script-wise:


    First off, I wouldn't chmod files to 777 unless they need to be executeable by everyone. Chmod 500 works fine for almost all intents and purposes.

    You seem to not apt-get update after adding the i386 architecture. This will (probably) cause subsequent apt-gets to fail.

    The gcc-multilib is no longer required by voron's libcod if I recall correctly

    What are you using zram-config for?

    You're using a hard-coded path for the noip folder. If they update (and increase the version number) your script will no longer work. Try cd noip*

    You're not cleaning up the downloaded .tar file for the noip install

    Why do you need mysql-server and php5-cgi just for installing a web server, which is most likely going to be used for redirect stuff?

    You don't seem to be setting the owner or file permissions on the php.ini file when overwriting the old one

    The linking of the phpmyadmin can fail in case such a directory and/or link already exists. Use -f for ln to force the link to be created regardless (might cause dataloss if there's a phpmyadmin folder with files in it already though)

    You're completely removing the apache2 program during the installation, without informing the user about it. Worse, you remove it and its config files, which are most likely custom (apt-get purge)

    Why is the new cod2 user granted sudo privileges? I'd put my cod2-specific accounts without sudo privileges for obvious reasons

    There's probably no need to specify the base dir (-b /home) in your useradd command

    If all you want to do is add a user with a password, use adduser instead of useradd. It will prompt the user to input a password as well, so you don't have to manually call passwd afterwards

    You're assuming that the user has the cod2install folder in his home dir (like /root/cod2install). This will not always be the case. Better to just copy all contents of current dir to the new folder

    No need to chmod those files to 777 again. 500 would suffice for read+execute privileges. (when cloning git repos the correct chmod settings are already applied. These are determined at git-commit time, so whatever permissions you upload get downloaded anyway)

    You're trying to execute the cod2_servers.sh from the original location. This might fail if this original user is root, and the user has no read-rights on the root dir (default situation). Better to use the /home/$user/ stuff for that. (I am not 100% sure this will happen, but better safe than sorry)

    Your description for last localized file only seems off for 1.2. I recall 1.2 missing the last localized file, causing the server to message PC_PATCH_CLIENTDOWNLOADDISCONNECTED on a few occasions. 1.2 should only differ in iw_15.iwd compared to 1.0

    The link included in the git project seems already dead. Reporting it per comments.

    For linking all contents of a directory, you can more easily just do ln -s /source/*.iwd /dest/ No need to use a for loop there.

    Please keep in mind that copying the pb folder will automatically enable your punkbuster. The sv_pb cvar does not influence this for some strange reason. You might want to add a separate question for it.

    You're limiting users to one server per fs_game. Users cannot run multiple servers from the same (named) fs_game folder due to the .sh file being named after the fs_game.

    There's no input checking on port or cracked cvars

    There's no need to set sv_version afaik

    You might want to add a wait/sleep in the while loop that's restarting the server. Otherwise, a bug in the mod might completely trash all server resources

    You probably want to chmod the resulting fs_game.sh files to 500 so they can actually be executed.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

    Sending me a private message makes me want to help you LESS.

  15. The Following 2 Users Say Thank You to IzNoGoD For This Useful Post:

    kung foo man (3rd May 2017),Lonsofore (3rd May 2017)

  16. #9
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,569
    Thanks
    17
    Thanked 916 Times in 570 Posts
    Thread sticky-d.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

    Sending me a private message makes me want to help you LESS.

  17. The Following User Says Thank You to IzNoGoD For This Useful Post:

    Lonsofore (3rd May 2017)

  18. #10
    Private Lonsofore's Avatar
    Join Date
    Oct 2016
    Posts
    77
    Thanks
    79
    Thanked 32 Times in 22 Posts
    Thank you, IzNoGoD :)
    I'm a bit confused now, so much bugs here. But I expected it.
    I'll try to fix the most of them soon in few next commits.
    In next update I wanna add a menu, where you can check, what do you want to install.


    Quote Originally Posted by IzNoGoD View Post
    What are you using zram-config for?
    So, I'll make a question about it there.


    Quote Originally Posted by IzNoGoD View Post
    Why do you need mysql-server and php5-cgi just for installing a web server, which is most likely going to be used for redirect stuff?
    Already made a question about mysql and phpmyadmin (what required php5-cgi)


    Quote Originally Posted by IzNoGoD View Post
    You don't seem to be setting the owner or file permissions on the php.ini file when overwriting the old one
    Well... it's root's file, so do we need to change it? Or do you mean, that after sed file permissions can change?


    Quote Originally Posted by IzNoGoD View Post
    The linking of the phpmyadmin can fail in case such a directory and/or link already exists. Use -f for ln to force the link to be created regardless (might cause dataloss if there's a phpmyadmin folder with files in it already though)
    In this case, I think, better to fail with link then lose data.


    Quote Originally Posted by IzNoGoD View Post
    You're completely removing the apache2 program during the installation, without informing the user about it. Worse, you remove it and its config files, which are most likely custom (apt-get purge)
    Will fix it in update - there are no this shit. And I ask about prefer web server.


    Quote Originally Posted by IzNoGoD View Post
    You're trying to execute the cod2_servers.sh from the original location. This might fail if this original user is root, and the user has no read-rights on the root dir (default situation). Better to use the /home/$user/ stuff for that. (I am not 100% sure this will happen, but better safe than sorry)
    Can you tell more about it, please? I'm not sure that I understood it correct.


    Quote Originally Posted by IzNoGoD View Post
    Your description for last localized file only seems off for 1.2. I recall 1.2 missing the last localized file, causing the server to message PC_PATCH_CLIENTDOWNLOADDISCONNECTED on a few occasions. 1.2 should only differ in iw_15.iwd compared to 1.0
    So, iw_15 only for 1.2 and iw_15 and localized files for 1.3, right?


    Quote Originally Posted by IzNoGoD View Post
    The link included in the git project seems already dead. Reporting it per comments.
    That's why I wanna add torrent there (already did, in fact, but didn't upload it yet).


    Quote Originally Posted by IzNoGoD View Post
    Please keep in mind that copying the pb folder will automatically enable your punkbuster. The sv_pb cvar does not influence this for some strange reason. You might want to add a separate question for it.
    Didn't know about that...


    Quote Originally Posted by IzNoGoD View Post
    You're limiting users to one server per fs_game. Users cannot run multiple servers from the same (named) fs_game folder due to the .sh file being named after the fs_game.
    Didn't think about that, you're right.


    Quote Originally Posted by IzNoGoD View Post
    There's no input checking on port or cracked cvars
    Will ask :)


    Quote Originally Posted by IzNoGoD View Post
    There's no need to set sv_version afaik
    Well, can we identify server version somehow?
    found getCvarFloat("shortversion")


    P.S. I missed some remarks, where I can answer only "You're right, IzNoGoD"
    Last edited by Lonsofore; 4th May 2017 at 07:57.

  19. The Following User Says Thank You to Lonsofore For This Useful Post:

    kubislav23 (4th May 2017)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •