Tag Info

Hot answers tagged

28

Yes! This is a big deal, and incredibly common. And there are two basic approaches. One way is simply with scripted installs, as for example used in Fedora, RHEL, or CentOS's kickstart. Check this out in the Fedora install guide: Kickstart Installations. For your simple case, this may be sufficient. (Take this as an example; there are similar systems for ...


24

python -m SimpleHTTPServer should do it.


21

To run a service without or before logging in to the system (i.e. "on boot"), you will need to create a startup script and add it to the boot sequence. There's three parts to a service script: start, stop and restart. The basic structure of a service script is: #!/bin/bash # RETVAL=0; start() { echo “Starting <Service>” } stop() { echo “Stopping ...


18

Depending on init system, you create init script differently. Fedora gives you upstart and systemd to choose from, and of course SysV compatibility. Upstart create service definition file as /etc/init/custom-tomcat.conf put inside: start on stopped rc RUNLEVEL=3 respawn exec /path/to/you/tomcat --and --parameters And you Tomcat should ...


11

A user's home directory is the initial directory when a user logs in. Normally the user may create files and directories only in in home directory (apart from temporary directories). Also various settings (user specific startup files and such) are usually stored in the user's home directory. Server is just annother name for a host (a computer). Think of a ...


11

The closest equivalents that I can think of are VirtualBox or Xen. Wikipedia has a list of virtual machine softwares.


10

There are two reasons lsof | wc -l doesn't count file descriptors. One is that it lists things that aren't open files, such as loaded dynamically linked libraries and current working directories; you need to filter them out. Another is that lsof takes some time to run, so can miss files that are opened or closed while it's running; therefore the number of ...


9

Here's a couple: run Linux as your primary operating system, on both your desktop and your laptop, if any install KVM and virt-manager and build a couple of virtual machines build a package for your distro of choice (a .deb or .rpm file); it helps in understanding a lot of things build your own kernel These might not seem directly related to your own ...


9

Use node.js , fast and lightweight. Or just use simple nc netcat command to start a quick webserver on a port and serve the content of a file including the server response headers. Reference from Wikipedia: http://en.wikipedia.org/wiki/Netcat#Setting_up_a_one-shot_webserver_on_port_8080_to_present_the_content_of_a_file { echo -ne "HTTP/1.0 200 ...


9

If you have a separate server to run your check script on, something like this would do a simple Ping test to see if the server is alive: #!/bin/bash SERVERIP=192.168.2.3 NOTIFYEMAIL=test@example.com ping -c 3 $SERVERIP > /dev/null 2>&1 if [ $? -ne 0 ] then # Use your favorite mailer here: mailx -s "Server $SERVERIP is down" -t ...


8

I'm not sure how "on topic" this question is but I think that it is fun. The more of your computing that you move into Linux, the faster you will start to pick things up. Here is something I did shortly after moving to using Linux exclusively. It requires having a spare computer. Set up a server with Ubuntu Server. Set up SSH access to the server. ...


8

What you're looking for is called a quota. I suggest you start here.


7

Change the setuid bit of mysqld executable and the ownership of the executable file to mysql account, besides adding the required user in the group mysql for making him have access to the files on the filesystem. Use visudo -f /etc/sudoers and grant him permission to execute the /etc/rc.d/init.d/mysql start and /etc/rc.d/init.d/mysql stop as two seperate ...


7

Creating an ha environment has a lot of caveats and is complicated, and often times depends on the actual software (e.g. creating a master-slave environment for mysql is different than for postfix0 If you want to get started and only want to have two systems and don't have time to configure all your daemons accordingly you should have a look at drbd, raid-1 ...


7

Method #1: ssh-keyscan One method would be to use the command ssh-keyscan to see if a ssh daemon is up and functioning. Just loop through the IP addresses and ssh-keyscan <ip> | grep -v ... each server. If the server is there, the status returned by running the ssh-keyscan ... | grep -v ... command will be a 0, anything else (1 or higher) means there ...


7

Create a user and set his login shell to your command. For example: sudo apt-get install sl sudo adduser foo sudo chsh -s $(which sl) foo ssh foo@localhost Also have a look at man sshd_config for some other ways to configure you ssh server. (Like adding a ForceCommand.)


6

If you have a cron daemon, one of the predefined cron time hooks is @reboot, which naturally runs when the system starts. Run crontab -e to edit your crontab file, and add a line: @reboot /your/command/here


6

RedHat Enterprise Linux (RHEL) is the server-based version offered by Redhat (the company behind Fedora), for which you can buy their support. CentOS is the version maintained and supported by the open source community. The primary difference, unless you want to buy RedHat's support, seems to be that CentOS unbrands RHEL (replacing the RH artwork) and, I ...


6

Since version 5.4.0 PHP also has a built-in web server: php -S localhost:8000


6

Fedora only has a Desktop edition. In my experience, "server" distros have a longer support lifetime than desktop distros. If you want something that has a longer support cycle, use Red Hat Enterprise Linux, or one of the RHEL clones like CentOS. Fedora really isn't suited for a long-term support OS, because at best you'll get 13 months of support if you ...


6

Yes, there is a Linux (and Windows/Mac) based SSTP (and lot more) VPN Server. It is called SoftEther VPN (http://www.softether.org). I used it on Ubuntu 13.04 release. Best of off, it is free. Granted, there are couple of limitations with the free version (for example, cannot use external authentication, client certificates etc.) In general, it seems to ...


6

No you do not require a mail server to send mail. I'm most familiar with Sendmail and there are 3 classifications of functionality that fulfill email as a service. MDA (Mail Delivery Agents) is 1, and MTA (Mail Transfer Agents) is 2, and 3 is MUA (Mail User Agents). The terminology get's confusing but you do not require an MTA to be running all the time. ...


6

Run an nc listener that echo's out one of the voucher codes when you telnet or nc to it. If they look at the file, they get it too. #!/bin/sh nc -i 2 -l -p 3128 -c "echo amazoncode" Name it something useful, like squid Create some local firewall rules with names or parameters of amazon codes. iptables -N amazoncode -P ACCEPT iptables -I INPUT -j ...


5

Dovecot or Courier is probably your best bet. http://wiki2.dovecot.org/POP3Server http://www.courier-mta.org/install.html#pop3


5

For simply running a script after the computer started but before a user logs in, you can simply edit the script /etc/rc.local which is meant to solve exactly this task.


5

Tomcat is a fairly common service, I'd recommend looking at the init script provided by the distro already. Chances are it works with your customized binary, with little to no tweaking.


5

Certainly many people have used Ubuntu Server with Windows clients. The Ubuntu Server Guide covers pretty much all of what you want to do. Here are a few comments on your proposed setup: Ditch FTP. Use SSH instead. Personally, I would also add that you should set up key-based authentication and disable password auth. See this page for some help. I don't ...


5

Key-based authentication can only work if the ssh process can find your key. You presumably have your key in your home directory; but you've never told sshfs where to look for a key. At boot time, it would be root mounting all filesystems, therefore the key must be either in /root/.ssh or referenced in /root/.ssh/config. I recommend mounting the filesystem ...


5

Debian should have the tool dmidecode available. You should find just about everything you need from there. dmidecode: http://www.nongnu.org/dmidecode/


5

It's possible, but probably not desirable. The VLC client (window) will be shown on whatever display you want, but it will be playing uncompressed video, which will have to be sent as networked X requests. Even without any overheads, sending 720×540 at 24 bpp and 30 fps will need around 279 Mbps (720px × 540px × 3 bytes/pixel × 30 fps × 8 bits per byte). ...



Only top voted, non community-wiki answers of a minimum length are eligible