freebsd

Building Gold linker in FreeBSD

坚强是说给别人听的谎言 提交于 2020-01-06 19:06:17
问题 I followed the steps on http://llvm.org/docs/GoldPlugin.html#lto-how-to-build to build the gold plugin on FreeBSD but ! Heres a link to the screenshot of the error:http://postimg.org/image/anlpuufbl/ This is the error message that it shows and so I am also unable to get ld-new. I checked and no CFLAGS were set in etc/make.conf. How to proceed with the installation? I am using the deault clang version supplied with FreeBSD 10.1. 回答1: I think you just need to install devel/binutils port or its

Multiple jails one public ipaddress no nat

穿精又带淫゛_ 提交于 2020-01-05 04:03:33
问题 My question is pretty simple. I have scoured the web and cannot discern from what i have read how to implement the following. My question is simple. Is the following possible and can someone point me to a thorough article discussing this? I am new to networking. I run a FreeBSD 11.1-RELEASE dedicated server. I have built several jails two of which will run Apache 24 / php72. I have multiple domain names pointing to the same public ip address. I want to forward all port 80 and 443 traffic to

How do I replace select() with kevent() for higher performance?

强颜欢笑 提交于 2020-01-03 09:10:15
问题 From the Kqueue Wikipedia Page: Kqueue provides efficient input and output event pipelines between the kernel and userland. Thus, it is possible to modify event filters as well as receive pending events while using only a single system call to kevent(2) per main event loop iteration. This contrasts with older traditional polling system calls such as poll(2) and select(2) which are less efficient, especially when polling for events on a large number of file descriptors That sounds great. I

PHP Unzip very large file

笑着哭i 提交于 2020-01-02 05:22:26
问题 I have a zip file on the server. It's 1.1gb made up of thousands of small files. I do not have shell or root access to the server and can only use ftp and create php files.. so far I have tried exec and shell exec but none worked. The server is running free bsd. How can I unzip the file into the directory it is in? 回答1: For a pure PHP solution, try PclZip - this would not require you to install any PHP extensions or require shell access - you just need to write access to wherever you want to

How do I get a bash script working on FreeBSD, OpenBSD and Linux without modifying it?

▼魔方 西西 提交于 2020-01-01 04:56:08
问题 Sorry, the headline might be a bit irritating, but I didn't know anything better. Anyway, I want a bash script to work on FreeBSD, OpenBSD and Linux without modifying it, but bash isn't located at the same place in Linux and BSD. So, if I write #!/bin/bash then it won't work on BSD, because the bash shell is located in /usr/local/bin/bash there. Is there any solution to get this script working on both? Or do I really need to ship two scripts with different paths...? 回答1: Using env in the

FreeBSD: network interface address: dhcp or static

徘徊边缘 提交于 2019-12-30 10:34:33
问题 How can I programmingly (C) know if given interface has static address or one provided by dhcp ? I can look at /var/db/dhclient.leases.<interface_name> . Any better/cleaner way? any ioctl I can use? 回答1: Read /etc/rc.conf . Look for lines starting with ifconfig and see which of those contain the text DHCP . This will not catch interfaces that were re-configured by running dhclient manually. Parsing the leases file would work better in that respect, assuming its permessions allow your program

Installing Python on FreeBSD 8.1

我怕爱的太早我们不能终老 提交于 2019-12-30 07:32:10
问题 So I installed python on my FreeBSD box with these commans: #portsnap fetch #portsnap extract #portsnap update #cd /usr/ports/lang/python32 #make install clean Everything worked and I got no error messages. Installation went smoothly. However when I type python in shell, I get: python: Command not found. Help? 回答1: You can search it: find /usr/bin /bin/ /usr/local/bin -iname 'python*' 回答2: I know it's an old post but it is still not completely answered. Command in accepted answer from guettli

Using VisualVM to connect to a remote jstatd instance through a firewall [duplicate]

与世无争的帅哥 提交于 2019-12-29 14:28:47
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: VisualVM over ssh I'm writing this question and answering it because I spent a few hours getting this to work today and no answer I found on here worked for me. Hopefully this is helpful for others. If you have another solution than the one I ended up using, please feel free to answer the question as well. If yours is better I'll accept yours instead. The problem: I'm trying to monitor some home made java

PHP PDO exception: could not find driver

人盡茶涼 提交于 2019-12-29 07:43:53
问题 Does the MySQL-server and PHP5-MySQLi version have to match in order for a connection to be possible? I'm currently receiving the error below: I am running BSD. "Fatal error: Uncaught exception 'PDOException' with message 'could not find driver'..." Here is the the connection info: $info = "mysql:dbname=myDB;host=localhost"; $user = "dbUser"; $pw = "somePW"; return(new PDO($info, $user, $pw)); Here is my MySQL information: mysql-server-5.5.24 php5-mysqli-5.4.3 回答1: PDO uses database specific

Firebird 2.5 CHARACTER SET WIN1252 is not installed

妖精的绣舞 提交于 2019-12-29 07:08:09
问题 I've installed Firebird-Server 2.5 on FreeBsd 9.1 using: pkg install firebird-server-2.5.2_1 It's working ok, since I can connect using FlameRobin from an external PC. Now, when I try to restore a database using gbak, I got this: ... gbak: ERROR: CHARACTER SET WIN1252 is not installed gbak:Exiting before completion due to errors Should I install something more server side?. The database was created on a Windows machine, that's why its character set is WIN1252. EDIT: after some trouble I